Community Forums › Forums › Archived Forums › General Discussion › Eliminating the Author Box
Tagged: author box
- This topic has 2 replies, 2 voices, and was last updated 10 years, 5 months ago by Mark.
-
AuthorPosts
-
November 15, 2013 at 1:09 pm #73227MarkMember
I am trying to figure out how to eliminate the author box from below each blog posting. This is on a custom category template which should be showing just the post titles as links (i.e., no author box, no meta information).
I'm using a non HTML5 enabled child theme (Executive). From googling I thought the following would work:
add_action('genesis_before', 'mao_remove_all_but_post_title');
function mao_remove_all_but_post_title() {
remove_action( 'genesis_after_post', 'genesis_do_author_box_single' );
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
remove_action( 'genesis_post_content', 'genesis_do_post_content' );
}But while this gets rid of the meta information, and the blog content, the author box is still there. I've tried a bunch of things to make it go away, but without success. I've gone into the genesis structure files to try and figure out if I'm using the wrong parameters. But it looks like what I posted above should do it...and isn't working.
Advice, tips and leads would be much appreciated.
November 15, 2013 at 2:03 pm #73237SummerMemberYes, that one remove_action should work. Does it still show up if you disable the author box for that user?
Also, if this is in a custom template, you don't actually need to put those calls into that other action. You can just put the remove_action calls out on their own, before your other custom functions. Have you tried that yet?
Also, the author box is showing up in the category listing, or when you go to the actual post? I think I just confused myself trying to figure out where you're doing this 🙂
Can you provide a link where we can see this behavior in action?
WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
Slice of SciFi | Writers, After DarkNovember 15, 2013 at 5:57 pm #73316MarkMemberI was able to get things to work...and then I decided I didn't want to eliminate the information completely, so I used a filter to modify what was being shown (I ultimately decided I just didn't want to expose the comment functionality on that particular page).
Here's what I ended up with in my custom template file:
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
remove_action( 'genesis_post_content', 'genesis_do_post_content' );add_filter( 'genesis_post_info', 'mao_post_info_no_comment' );
add_filter( 'genesis_post_title_text', 'mao_post_title_text_qa' );function mao_post_info_no_comment( $post_info ) {
$post_info = 'posted by [post_author_posts_link] on [post_date] [post_edit]';
return $post_info;
}function mao_post_title_text_qa( $post_title ) {
if( in_category('question') ) {
return 'Q: ' . get_the_title();
}
elseif( in_category('answer') ) {
return 'A: ' . get_the_title();
}return get_the_title();
}Thanx for your help!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.