![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
I have searched and searched and apparently I am not doing something right or leaving something out... I'm learning about conditional tags. I wanted the modern blogger theme to have the post date flags like family tree. I've since learned that I had added it to modern blogger different than he way family tree has it- it uses a custom post_info function. I used the post info however it added it to every post and not just the blog (my front page now). Shown below is what I've added to my functions code and of course styled it in the css. I know I need to added the conditional tag if(is_front_page()) or (is_home()) and if_is_single()) statements but I don't really know what or where to put it. Everything I've tried fails... I have the simple hooks plugin-would that be easier to use? I just need help...
/** * Create custom post info function. * * This is done to mark up the post date. * * @since 1.0 */ add_action('genesis_before_post_content', 'modernblogger_post_info'); function modernblogger_post_info() { ?> <div class="post-date-wrap"> <div class="post-date"> <div class="month"><?php echo the_time( 'M' ); ?></div> <div class="day"><?php echo the_time( 'j' ); ?></div> <div class="year"><?php echo the_time( 'Y' ); ?></div> <div class="post-info"><?php echo do_shortcode( '[post_comments zero="0 Comments" one="1 Comment" more="% Comments"]' ); edit_post_link( __( 'Edit', 'child' ), '', '' ); /* if logged in */ ?> </div> <?php } Thanks to anyone who helps! I appreciate your knowledge and your will to teach others... Hopefully I can pay that forward one day!
__________________
Audrea Robbins www.AGirlyGirlInABoysWorld.com |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Conditional tags | zenboy | General Discussion | 2 | 11-04-2008 10:31 AM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us