My 2 website pages that are built with PHP Laravel are not included in sitemap

#922757
Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting support.

    You can modify the following filter to add custom URLs to your sitemap:

    /**
     Filter to add extra URLs to the XML sitemap by type.
     *
     Only runs for the first page, not on all.
     *
     @param string $content String content to add, defaults to empty.
     */
    add_action( 'rank_math/sitemap/{$type}_content', function() {
            return '<url>
                    <loc>https://rankmath.com/some-custom-url/</loc>
                    <lastmod>2020-06-10T20:20:20+00:00</lastmod>
            </url>';
    });

    Here’s how you can add filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    We hope this helps. Please let us know if you have further questions or concerns.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘My 2 website pages that are built with PHP Laravel are not included in sitemap’ is closed to new replies.