Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to remove meta tags from archive view -Lifestyle theme
Tagged: archives, lifestyle theme, meta data
- This topic has 10 replies, 5 voices, and was last updated 10 years, 5 months ago by
DTHkelly.
-
AuthorPosts
-
January 10, 2014 at 8:19 am #84371
melinwloo
ParticipantHello,
How do I remove the category and tags listed on the archive pages of my site? I still want them on the individual blog posts.
(The areas where it says Filed under:... and Tagged with:...)http://www.empressofdirt.net/blog/
Thank you,
http://www.empressofdirt.net/blog/January 10, 2014 at 8:29 am #84375Genesis Developer
Memberadd this code in your functions.php file
add_filter( 'genesis_post_meta', 'sp_post_meta_filter' ); function sp_post_meta_filter($post_meta) { if (is_single() ) { $post_meta = '[post_categories before="Filed Under: "] [post_tags before="Tagged: "]'; return $post_meta; }else{ return ; } }
January 10, 2014 at 8:48 am #84382melinwloo
ParticipantI added the code to the bottom of my functions.php file in my Lifestyle theme and the meta tags are still visible.
January 10, 2014 at 9:16 am #84396Genesis Developer
MemberI tested and this is working for me
add_filter( 'genesis_post_meta', 'sp_post_meta_filter' ); function sp_post_meta_filter($post_meta) { if (is_single() ) { $post_meta = '[post_categories before="Filed Under: "] [post_tags before="Tagged: "]'; return $post_meta; }else{ return ""; } }
January 10, 2014 at 10:39 am #84425melinwloo
ParticipantIt's still not working for me. Does it matter where in functions.php the code is placed?
I've checked the file on my cpanel and refreshed in two browsers without any luck.
January 13, 2014 at 8:12 am #84955masonjarsalads
MemberThis worked for me at the end of my php file....I am using the sample theme. I've tried several different codes at this point.
add_filter( 'genesis_post_meta', 'remove_post_meta_home_page' );
function remove_post_meta_home_page($post_meta) {
if ( !is_home() ) {
$post_meta = '';
return $post_meta;
}}January 15, 2014 at 12:57 pm #85375melinwloo
ParticipantI'm not just trying to remove it from the home page but the archive pages as well. Tried @masonjarsalads' suggested code and tags and categories are still visible.
January 15, 2014 at 1:32 pm #85380Genesis Developer
MemberAre you using simple edit plugin? Disable it and check again
January 15, 2014 at 1:47 pm #85386melinwloo
Participant@Genwrock It worked. Thank you.
In case anyone else has the problem,
I disabled the Genesis simple edit plugin and cleared the cache.
Saved a copy of my Lifestyle functions.php file (Appearance-> Editor ->functions.php)
Used the code provided (above) by @Genwrock - added it to the end of my Lifestyle functions.php file
Cleared my browser cache
Refreshed my pageNow the categories and tags do not appear under archive listings. Phew!
Now to figure out how to get rid of the gap between archive listings...
October 9, 2014 at 11:40 pm #127313Gianmaria
MemberHello Melinwloo,
how did you add an archive page?
I only (I think) can specify an archive template but it's not what I want... I want a simply month by month archive...
thanks
bye
GianmariaOctober 10, 2014 at 7:21 am #127326DTHkelly
MemberSome reference:
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.