Community Forums › Forums › Design Tips and Tricks › Customise Post-Info
Tagged: .post-info
This topic contains 4 replies, has 2 voices, and was last updated by Jen Baumann 4 months, 4 weeks ago.
-
AuthorPosts
-
December 26, 2012 at 8:14 am #7457
I have copied this code from Luscious theme function.php hoping to remove the date in post-info and place the new custom date with the title. I almost succeeded except the old standard date is still in the post-info. I am hoping someone can guide me a little bit.
I am no master in Genesis so my question might seem silly to you but I cannot figure our why the standard date is still showing up.
/** Add date block before post title */
add_action( ‘genesis_before_post_title’, ‘custom_post_date’ );
function custom_post_date() {if ( ! is_page() ) {
echo ”;
echo do_shortcode( ‘Feb 6, 2012 ‘ );
echo ”;
}}
/** Customize the post info function */
add_filter( ‘genesis_post_info’, ‘post_info_filter’ );
function post_info_filter( $post_info ) {if ( ! is_page() ) {
return ‘By · Leave a Comment ‘;
}return $post_info;
}
Here is the website http://nintendowiifitconsole.co.uk/?p=563
Thank you
-
This topic was modified 4 months, 4 weeks ago by
Treefungus.
-
This topic was modified 4 months, 4 weeks ago by
Treefungus.
December 26, 2012 at 9:35 am #7461Sorry… here is the correct code. Not sure why the code had changed but I still have a problem.
/** Add date block before post title */
add_action( ‘genesis_before_post_title’, ‘custom_post_date’ );
function custom_post_date() {if ( ! is_page() ) {
echo ‘<div class=”post-date”>’;
echo do_shortcode( ‘[post_date format="M j, Y"]‘ );
echo ‘</div><!– end .post-date –>’;
}}
/** Customize the post info function */
add_filter( ‘genesis_post_info’, ‘post_info_filter’ );
function post_info_filter( $post_info ) {if ( ! is_page() ) {
return ‘By [post_author_posts_link] · [post_comments] [post_edit]‘;
}return $post_info;
}
December 26, 2012 at 11:08 am #7481Are you using Genesis Simple Edits? http://wordpress.org/extend/plugins/genesis-simple-edits/
Jennifer “Hermione” Baumann | Recommended StudioPress Developer
Dream Whisper Designs | Themessence | @dreamwhisper | If I’ve helped, like me on FacebookDecember 26, 2012 at 11:37 am #7488How embarrassing. I installed that plugin but never used it. I deactivated it and now it is working. I guess it was overriding my code. Silly me.
Thanks for helping me out
December 26, 2012 at 11:40 am #7490You’re very welcome!
Jennifer “Hermione” Baumann | Recommended StudioPress Developer
Dream Whisper Designs | Themessence | @dreamwhisper | If I’ve helped, like me on Facebook -
This topic was modified 4 months, 4 weeks ago by
-
AuthorPosts
The topic ‘Customise Post-Info’ is closed to new replies.