Site logo

Archived topic

Hide Archive page excerpts

26 replies · Started by Earl on May 23, 2022

Viewing posts 1–15 of 27

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.

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!

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.

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...

Are you logged in as an Admin user ?

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

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

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 ?

still no joy.

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

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' );

Personally edit the files at the server level is best :)

That code looks correct!

Thanks for your help Dave!

This archived topic is closed to new replies.