- This topic has 26 replies, 5 voices, and was last updated 2 months, 2 weeks ago by Earl.
May 23, 2022 at 2:42 pm #2230074Earl
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!May 23, 2022 at 4:09 pm #2230113LeoStaffCustomer Support
Any chance you can link us to the page in question?
You can use the private information field:
Let me know 🙂May 24, 2022 at 2:26 am #2230527Earl
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.May 24, 2022 at 3:55 am #2230633DavidStaffCustomer Support
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:May 25, 2022 at 5:39 am #2232078Earl
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!May 25, 2022 at 5:58 am #2232093DavidStaffCustomer Support
Sorry my bad – this doc explains how to add 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.May 25, 2022 at 6:21 am #2232104Earl
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…May 25, 2022 at 6:24 am #2232107DavidStaffCustomer SupportMay 25, 2022 at 6:29 am #2232113Earl
for this project, I created a staging site from the original to work on and then installed GP.May 25, 2022 at 6:37 am #2232122Earl
Just tried to create a new admin account to see if the edit function PHP would show up under appearance… no luckMay 25, 2022 at 6:45 am #2232136DavidStaffCustomer 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 ?May 25, 2022 at 7:21 am #2232180Earl
still no joy.
no security mods other than wp rocket and secure copy protection.May 25, 2022 at 7:42 am #2232202Earl
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?
* 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’ );May 25, 2022 at 7:58 am #2232378DavidStaffCustomer SupportMay 25, 2022 at 8:00 am #2232380Earl
Thanks for your help Dave!
- You must be logged in to reply to this topic.