How to Remove #more from Permalinks in GeneratePress Premium

If you’re using the GeneratePress Premium theme for your WordPress site, you’ve probably noticed that when you click the “Read More” button in your blog posts, GeneratePress automatically adds the #more keyword to the end of the URL or permalink. This URL structure is considered unfriendly for search engine optimization (SEO). In this article, I’ll show you how to easily fix this issue.

Remove more from url in generatepress premium

Removing #more from URLs Using the Theme Editor

    1. Log into your WordPress admin area.
    2. Hover over “Appearance” and select “Theme Editor”.
    3. Locate and open the function.php file.
    4. Copy and paste the following code at the end of function.php:
add_filter( 'generate_more_jump','generate_disable_more_jump' );
function generate_disable_more_jump()
{
return '';
}
    1. Save the changes to the file.

Remove more from url in generatepress premium

After doing this, #more will no longer be added to the URLs of your blog posts.

Code Explanation:

  • add_filter(‘generate_more_jump’, ‘generate_disable_more_jump’); – This line adds a new filter to the existing generate_more_jump filter in WordPress.
  • function generate_disable_more_jump() { return ”; } – This is a custom function that returns an empty string when WordPress calls it through the generate_more_jump filter.

Removing #more via a Child Theme

If you are using a child theme for GeneratePress, the best way to make the change is to create a new functions.php file in the child theme folder and add the code above to it.

This method is preferable because any changes made directly to the parent theme may be overwritten when the theme is updated. Using a child theme protects your modifications from being overridden.

Remove more from url in generatepress premium

Alternative Method Using the WPCode Plugin

If you don’t want to edit your theme files directly, you can use the WPCode plugin instead:

  1. Install and activate the WPCode plugin.
  2. Go to “+ Add Snippet” > “Add Your Custom Code (New Snippet)”.
  3. Paste the same code into the new snippet.
  4. Select “Code Type” > “PHP Snippet”
  5. Add a name for the snippet and press save
  6. To apply the code snippet across your entire WordPress site, toggle the checkbox at the top of the Code Snippets admin page from “Inactive” to “Active”, then click the “Update” button. This will run the snippet globally instead of just on specific pages or posts.

Both of these methods will completely remove #more from your links in the GeneratePress Premium theme, making your URLs more appealing for search engines.

Leave a Comment