I want to add a date button to my website by editing a php file. The tutorial I am following is here:
http://www.sjlwebdesign.co.uk/sjl-blog/index.php/general-sjl-news/sexy-wordpress-date-button/
My problem is that I don't have a single.php, index.php, or a search.php file for this template I am using. I only have a functions.php file and this is one it entails:
<?php
// Start the engine
require_once(TEMPLATEPATH.'/lib/init.php');
// Child theme library
require_once(CHILD_DIR.'/lib/custom-header.php');
require(CHILD_DIR.'/lib/style.php');
// Child theme (do not remove)
define('CHILD_THEME_NAME', 'Lifestyle Theme');
define('CHILD_THEME_URL', 'http://www.studiopress.com/themes/lifestyle');
// Add support for custom background
if ( function_exists('add_custom_background') ) {
add_custom_background();
}
/** Customize the post info function */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if (!is_page()) {
$post_info = 'Published on: [post_date] by [post_author_posts_link] [post_comments] [post_edit]';
return $post_info;
}}
// Add new image sizes
add_image_size('Mini Square', 70, 70, TRUE);
add_image_size('Square', 110, 110, TRUE);
// Force layout on homepage
add_filter('genesis_pre_get_option_site_layout', 'lifestyle_home_layout');
function lifestyle_home_layout($opt) {
if ( is_home() )
$opt = 'content-sidebar';
return $opt;
}
// Add advertising code after single post
add_action('genesis_after_post_content', 'lifestyle_include_adsense', 9);
function lifestyle_include_adsense() {
if ( is_single() )
require(CHILD_DIR.'/adsense.php');
}
// Add two sidebars underneath the primary sidebar
add_action('genesis_after_sidebar_widget_area', 'lifestyle_include_bottom_sidebars');
function lifestyle_include_bottom_sidebars() {
require(CHILD_DIR.'/sidebar-bottom.php');
}
/** Customize the entire footer */
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'child_do_footer' );
function child_do_footer() {
?>
<center><p>© Copyright 2011-2012 <a href="http://www.pettraining411.com">PetTraining411.com</a> · All Rights Reserved · Designs by: <a href="http://www.j10designs.daportfolio.com/">J-10 Designs©</a> · <a href="http://pettraining411.com/wp-admin">Login</a></p></center>
<?php
}
/** Modify comments header text in comments */
add_filter( 'genesis_title_comments', 'custom_genesis_title_comments' );
function custom_genesis_title_comments() {
$title = '<img src="http://www.pettraining411.com/wp-content/uploads/2011/12/comments.png">';
return $title;
}
/** Modify the speak your mind text */
add_filter( 'genesis_comment_form_args', 'custom_comment_form_args' );
function custom_comment_form_args($args) {
$args['title_reply'] = '<img src="http://www.pettraining411.com/wp-content/uploads/2011/12/reply.png">';
return $args;
}
// Register widget areas
genesis_register_sidebar(array(
'name'=>'Sidebar Bottom Left',
'description' => 'This is the bottom left column in the sidebar.',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
'name'=>'Sidebar Bottom Right',
'description' => 'This is the bottom right column in the sidebar.',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
'name'=>'Featured Top Left',
'description' => 'This is the featured top left column of the homepage.',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
'name'=>'Featured Top Right',
'description' => 'This is the featured top right column of the homepage.',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
'name'=>'Featured Bottom',
'description' => 'This is the featured bottom section of the homepage.',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
add_filter( 'avatar_defaults', 'newgravatar' );
function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo('template_directory') . 'http://www.pettraining411.com/wp-content/uploads/2011/12/gravatar.jpg';
$avatar_defaults[$myavatar] = "Dog Training Info";
return $avatar_defaults;
}
I don't know where the "div class" tag goes that the tutorial is saying I need to put in the php code. As I looked through the php code i didn't notice anywhere that has a loop for my post.
Here is a post where I would like to add the date button and every other post that follows/:
http://www.pettraining411.com/vaccinations/
See where I edited it to say published on. I want all that gone and have the date button showing.