StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-08-2012, 04:29 PM
AudreaRobbins's Avatar
AudreaRobbins AudreaRobbins is offline
Registered User
Genesis Member
 
Join Date: Mar 2012
Posts: 60
Default Help with Conditional Tags

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional tags zenboy General Discussion 2 11-04-2008 10:31 AM


All times are GMT -5. The time now is 11:46 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.