Community Forums › Forums › Archived Forums › Design Tips and Tricks › Move Post-Info from above title to above Post-Meta in Executive
Tagged: .post-info, Executive
- This topic has 4 replies, 2 voices, and was last updated 11 years, 11 months ago by asterbird.
-
AuthorPosts
-
February 4, 2013 at 6:40 pm #18109Cleo3Participant
I need to move the Post-Info (date, author) from above the post title to right above the Post-Info (categories, tags) in the Executive child theme on both the category/blog listing type pages and on the individual post pages.
Here's a category page on the site:
http://horsesofthewest.com/horses-for-sale/category/all-horses-for-sale/
Here's an individual page:
http://horsesofthewest.com/horses-for-sale/2012/07/docs-image/
And here is a little screenshot/drawing of what I'm trying to do in case I didn't explain it very well.
https://docs.google.com/file/d/0B9KNFo2i4MtiQTJ0VHBnWDdzems/edit?usp=sharing
Any idea how I'd do this? Thanks!
February 5, 2013 at 11:47 am #18246asterbirdMemberTry this in your theme functions.php file:
/** Remove the post info function */ remove_action( 'genesis_before_post_content', 'genesis_post_info' ); // Add post info function somewhere else add_action( 'genesis_after_post', 'genesis_post_info' );
If it doesn't show up at the right place, replace genesis_after_post with another hook (see http://my.studiopress.com/docs/hook-reference/ for list of available hooks.)
Also check out http://my.studiopress.com/snippets/post-info/
February 5, 2013 at 8:19 pm #18362Cleo3ParticipantThanks! This is certainly getting me closer and I appreciate your help.
Now I have kind of a weird situation. On blog/category/listing pages I'm getting post-info twice above the post title and not at all below it.
The individual post pages have it both top and bottom.
Interestingly, your solution worked perfectly on my demo site for this site, so I'm guessing that narrows the issue down to something different between the two. I'll comb through the plugins to see if I might have an issue there? I doubt my plugins are identical on the two sites.
As I look through this functions.php file, which is mostly greek to me, I see this section and I wonder if it's part of why I can't get this to work? (Although, it's the same on both demo and live.) What does this section do? Should I remove it?
/** Relocate the post info */
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
add_action( 'genesis_before_post_title', 'genesis_post_info' );/** Customize the post info function */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if (!is_page()) {
$post_info = '
<div class=\'date-info\'>' .
__('posted on', 'executive' ) .
' [post_date format="F j, Y" before="<span class=\'date\'>" after="</span>"] ' .
__('by', 'executive' ) . ' [post_author_posts_link] [post_edit]
</div>
<div class="comments">
[post_comments]
</div>';
return $post_info;
}
}Thanks again - to anyone with some information.
/** Relocate the post info */
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
add_action( 'genesis_before_post_title', 'genesis_post_info' );/** Customize the post info function */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if (!is_page()) {
$post_info = '
<div class=\'date-info\'>' .
__('posted on', 'executive' ) .
' [post_date format="F j, Y" before="<span class=\'date\'>" after="</span>"] ' .
__('by', 'executive' ) . ' [post_author_posts_link] [post_edit]
</div>
<div class="comments">
[post_comments]
</div>';
return $post_info;
}
}February 5, 2013 at 8:44 pm #18368asterbirdMemberYes, that stuff is affecting it. Try commenting it all out, and see what happens on the frontend. That way, you've effectively deleted it, but it's still there if you need it later as you further develop the website.
I can't explain what it does, because I don't understand it all myself, but you might want to look at http://www.wpsquare.com/remove-change-post-info-genesis-theme/ to help.
I hope someone else can chime it too, and help out. 🙂
February 5, 2013 at 11:57 pm #18386asterbirdMemberYes, that is probably affecting it. Try putting all that code in comments, and see how it changes the frontend. Commenting it out is better than deleting, especially until you are finished developing the website.
Hopefully some others can chime in and help, because I don't know enough to even explain all that code. 🙂
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.