Site logo

Archived topic

Read More button changes permalink

7 replies · Started by hoya on February 25, 2020

Viewing posts 1–8 of 8

I installed Generatepress onto my staging site. I only noticed this after I pushed it live.

When I click on my "Read More" buttons from an archive category page, the permalinks have this added:

/#more-587 or whatever number it decides to generate.

Is this from my Generatepress theme? I would like for that not to happen.

I've been noticing this same issue for a while on my website. I'm not a PHP expert, so is there a way to add this code "add_filter( 'generate_more_jump', '__return_false' );" through the Generate Press elements module?
Thanks.

Actually you can add PHP via elements. I've done it and it works. The hooks element has a checkbox "Execute PHP" and if you check it and put PHP code in the content box it executes that code when it meets the conditions you specify. There's a mention of the PHP checkbox in this documentation: https://docs.generatepress.com/article/hooks-element-overview/

Donna

I should have emphasised 'that' PHP.
Although you can add and execute PHP using the Hook Element - the add_filter function is itself a Hook and shouldn't be executed from within a theme template action hook.

Oh, thanks for clarifying. Since it's not breaking the website, I'm going to put this on the back burner for now.

No problems. Glad to be of help

This archived topic is closed to new replies.