• Resolved wwadvice

    (@wwadvice)


    We were able to input the max pages per sitemap file through the general sitemap settings. I can no longer see this in 7.02

    Has this been removed?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Michael Ti?a

    (@mikes41720)

    Hello,

    Since the release of Yoast SEO v7.0, the ability to input the number of pages per sitemap file through the settings has been removed. It has been replaced with a filter.

    You can set the number of entries per sitemap using the following filter in your theme’s functions.php file:

    function max_entries_per_sitemap() {
    return X;
    }
    add_filter( ‘wpseo_sitemap_entries_per_page’, ‘max_entries_per_sitemap’ );

    Where “X” is the number of entries you want to limit your sitemap to. After that number, a new sitemap will be created with the remaining entries.

    Thread Starter wwadvice

    (@wwadvice)

    That’s not good. As an SEO consultant I work on many sites and I don’t always have access or want to change theme files. You have removed a feature that was very useful.

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    We understand your concern. We have removed this feature as it wasn’t something that everyone would need to set manually unless there is a reason for this.

    So, if you’d like to change the maximum entries per sitemap value, you’ll need to implement the provided filter in Yoast SEO.

    Thread Starter wwadvice

    (@wwadvice)

    That’s unfortunate. Thank you for the answer.

    I tried this fix, adding ‘

    function max_entries_per_sitemap() {
    return 100;
    }

    add_

    filter( ‘wpseo_sitemap_entries_per_page’, ‘max_entries_per_sitemap’ );

    to my functions.php file in my child theme, and when that didn’t work, in the primary theme.

    It breaks the site by posting this code in the “header” of every page of my site.

    Any clue what I’m doing wrong?

    function max_entries_per_sitemap() {
    return 100;
    }

    add_filter( ‘wpseo_sitemap_entries_per_page’, ‘max_entries_per_sitemap’ );

    That’s what I’m adding (formatting got messed up)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Entries per sitemap page removed?’ is closed to new replies.