Archived topic
Disable Post Date
9 replies · Started by Sean on April 24, 2016
I used the option to disable content title. Is there a way to disable the date?
You can using our Blog add-on in "Customize > Blog > Blog Content".
The only issue with that, is it also disables it on the index. I just want it disabled in the post only. Since in the post it looks better if I just include the date in the pageheader.
Try this:
add_filter( 'generate_post_date','generate_remove_single_date' );
function generate_remove_single_date()
{
// If we're on a single post, remove the date
if ( is_single() )
return false;
// Or else, show it
return true;
}
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Works like a charm, solved!
Great :)
It says "Editing generate-simple-php/custom.php (inactive)" and doesn't function as it used to. Using the Simple PHP plugin.
I don't think the (inactive) means anything. As long as the plugin is active in the plugins area it should work.
Figured out what was wrong. I thought I could only use the .zip plugin that you linked, but you do indeed need the one you linked to the WP plugins catalog.
That's very odd - but I'm glad you were able to resolve it.
