Archived topic
Read More button changes permalink
7 replies · Started by hoya on February 25, 2020
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.
Hi there,
This should help:
https://docs.generatepress.com/article/generate_more_jump/
Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know :)
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.
Hi there,
you cannot add that PHP via elements. You will need to use one of the Methods listed here:
https://docs.generatepress.com/article/adding-php/
The Code Snippets plugin is the simplest method if you're not using a Child Theme
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