[Resolved] Disable Post Date

Home Forums Support [Resolved] Disable Post Date

Home Forums Support Disable Post Date

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #189082
    Sean

    I used the option to disable content title. Is there a way to disable the date?

    #189115
    Tom
    Lead Developer
    Lead Developer

    You can using our Blog add-on in “Customize > Blog > Blog Content”.

    #189267
    Sean

    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.

    #189308
    Tom
    Lead Developer
    Lead Developer

    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/

    #189376
    Sean

    Works like a charm, solved!

    #189395
    Tom
    Lead Developer
    Lead Developer

    Great 🙂

    #196187
    Sean

    It says “Editing generate-simple-php/custom.php (inactive)” and doesn’t function as it used to. Using the Simple PHP plugin.

    #196220
    Tom
    Lead Developer
    Lead Developer

    I don’t think the (inactive) means anything. As long as the plugin is active in the plugins area it should work.

    #196236
    Sean

    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.

    #196266
    Tom
    Lead Developer
    Lead Developer

    That’s very odd – but I’m glad you were able to resolve it.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.