[Support request] Hide Archive page excerpts

Home Forums Support [Support request] Hide Archive page excerpts

Home Forums Support Hide Archive page excerpts

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #2230074
    Earl

    I’ve read the documentation here -> https://docs.generatepress.com/article/blog-content-layout/
    that tells me to set the excerpt to 0 if I don’t want it show.

    I’ve done that, but can’t get the excerpt on the archive page to disappear.

    Thanks!

    #2230113
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the page in question?

    You can use the private information field:
    https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    Let me know ๐Ÿ™‚

    #2230527
    Earl

    Hi Leo,
    I’ve included a URL to one of my archive pages in the private window. The site shown is a staging site that was set up that I’ll move to the primary URL once the project is finished.

    #2230633
    David
    Staff
    Customer Support

    Hi there,

    the Excerpt word count in the blog settings only applies to the auto excerpt.
    And your posts are using the More tag.

    You can tell GP to ignore the more tag and use the auto excerpt by adding the PHP Snippet provided here to your site:

    https://docs.generatepress.com/article/using-the-more-tag/#overwriting-the-more-tag

    #2232078
    Earl

    Hi Dave,
    I read the doc in the link, but I don’t know where to insert the php code that it references.

    Can you help me with that? Thanks!

    #2232093
    David
    Staff
    Customer Support

    Sorry my bad – this doc explains how to add PHP:

    https://docs.generatepress.com/article/adding-php/

    TLDR: If you’re using a Child Theme, add the code to your Child Theme functions.php. If you are not using a Child Theme, install the Code Snippets plugin ( link in the doc ) and add the code to a New Snippet.

    #2232104
    Earl

    thanks for the quick response…

    I am using the child theme, but I can’t seem to find where to edit the function php file…
    I thought it was in Appearance -> Theme Editor BUT….

    Theme editor is not listed under ‘Appearance’

    sorry to be ‘that guy’ today…

    #2232107
    David
    Staff
    Customer Support

    Are you logged in as an Admin user ?

    #2232113
    Earl

    Yes sir.
    for this project, I created a staging site from the original to work on and then installed GP.

    #2232122
    Earl

    Just tried to create a new admin account to see if the edit function PHP would show up under appearance… no luck

    #2232136
    David
    Staff
    Customer Support

    Try clearing browser caches and cookies OR login using an incognito/private browser.
    That will eliminate caching or cookies as an issue.

    If that don’t work then it could be security mod in your WP install. Any security plugins installed ?

    #2232180
    Earl

    still no joy.

    no security mods other than wp rocket and secure copy protection.

    #2232202
    Earl

    Hi Dave,
    Looks like I have to take the long way around and edit the functions php file with the host. Does the code below look correct?

    <?php
    /**
    * GeneratePress child theme functions and definitions.
    *
    * Add your custom PHP in this file.
    * Only edit this file if you have direct access to it on your server (to fix errors if they happen).
    */
    add_filter( ‘generate_more_tag’, ‘__return_empty_string’ );

    #2232378
    David
    Staff
    Customer Support

    Personally edit the files at the server level is best ๐Ÿ™‚

    That code looks correct!

    #2232380
    Earl

    Thanks for your help Dave!

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