[Support request] Error and no Nav menu showing on site

Home Forums Support [Support request] Error and no Nav menu showing on site

Home Forums Support Error and no Nav menu showing on site

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #901226
    Pablo

    Hi, there.

    For some reason, my site is showing an error at the top of every page:

    add_filter( ‘generate_show_excerpt’,’generate_show_excerpt_categories’ ); function generate_show_excerpt_categories( $show_excerpt ) { if ( is_category() ) { return true; } return $show_excerpt; }
    Skip to content

    I’m using the Freelancer GP theme.

    What I’ve already tried:

    1. Disabled all plugins, same error shows.
    2. With plugins enabled and disabled, tried different themes. Same error.

    Any suggestions?

    #901313
    David
    Staff
    Customer Support

    Hi there,

    looks like you have the code add to a GP Hook. Which version of GeneratePress Premium are you using?

    #901327
    Pablo

    Ah, that code is the cause:

    add_filter( 'generate_show_excerpt','generate_show_excerpt_categories' );
    function generate_show_excerpt_categories( $show_excerpt )
    {
        if ( is_category() ) {
            return true;
        }
    
        return $show_excerpt;
    }

    All fine when disabled. Do you know why this would be causing an issue? Really could use the function that the code provides (relating to Edward Olive).

    Paul

    #901334
    David
    Staff
    Customer Support

    You would need to add that Filter Function to your Child Theme Functions file or use the Code Snippets plugins. Filters like that cannot be added to Hooks.

    #901340
    Pablo

    I added the code via the HFCM plugin, as stated in the GP documentation.

    This is happening on my site: Your Kitchen Zone, ESO FAQs, We Trust, Cycling Off-Grid and The Golf Wish (I’m only mentioning the sites here as a reminder to my future self!).

    #901369
    David
    Staff
    Customer Support

    And is it working correctly now?

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