- This topic has 7 replies, 2 voices, and was last updated 6 years, 11 months ago by
Tom.
-
AuthorPosts
-
February 1, 2016 at 9:55 pm #169768
robmac
Greetings,
Does anyone happen to know any easy way, to REMOVE the date, from posts OTHER than my actual blog? Is there a plugin that will assist, or, would I have to code it, please? Thank you for any guidance offered.
ie,
“My Blog” [date to REMAIN]
posts – category A [Wanting to REMOVE date on posts]
posts – category B [Wanting to REMOVE date on posts]
etc
etcThank you.
February 2, 2016 at 9:24 pm #170072Tom
Lead DeveloperLead DeveloperHi there,
The Blog add-on allows you to remove it from all posts and your blog in the Customizer.
To remove it only within categories, you’ll need to use the available filters with an is_category() conditional.
I’m away from my desktop right now but can give you some example code as soon as I’m back if you need?
Let me know ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 4, 2016 at 3:19 pm #170473Tom
Lead DeveloperLead DeveloperHi there,
Give this a shot:
add_filter( 'generate_post_date','generate_change_date_display' ); function generate_change_date_display() { if ( is_home() ) { return true; } return false; }
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 7, 2016 at 5:07 am #171098robmac
Tom,
Sorry for delay in replying.
Sincere thanks, as ever, for your very helpful support.
Robert
February 7, 2016 at 8:49 am #171104robmac
Hi Tom,
What I found works best, for what I want to do is, [with my child theme active] adding to “Simple CSS” the following:
.entry-meta {display: none;} it removes the date and author from all my posts. However, it also does from my blog, could please suggest some code I could add to the above CSS to exempt a specific category, please?
Thank you.
Regards,
RobertFebruary 7, 2016 at 12:07 pm #171123Tom
Lead DeveloperLead DeveloperYou can hide it from categories with this:
.category .entry-meta { display: none; }
You can do specific categories with this:
.category-categoryname .entry-meta { display: none; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 9, 2016 at 2:46 am #171468robmac
Thanks again, seems to have worked fine!
February 9, 2016 at 11:12 am #171604Tom
Lead DeveloperLead DeveloperAwesome ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.