elementor / static-html-output

Static HTML Output Plugin for WordPress
https://statichtmloutput.com
The Unlicense
124 stars 33 forks source link

Custom Post Type - Sitemap not getting downloaded #122

Closed ichiragshah closed 4 years ago

ichiragshah commented 4 years ago

I am not able to generate the sitemap with custom post type. The Yoast SEO generated sitemap shows the XML that will be generated.

Screenshot 2020-07-17 at 2 41 28 PM

Check make-sitemap.xml & template-sitemap.xml in this case. Also, tried adding the above two files to include URLs field. Still, the static site does not contain the above two XML files.

Can I know what wrong I am doing here?

leonstafford commented 4 years ago

Hi @ichiragshah - sorry I missed your Telegram chats, but noticed you had some discussion with group, was there any progress on this?

As I understand, the plugin should detect the top-level Yoast sitemap, then detect all these other sitemaps based on the links contained in the main sitemap file. I'll need to get back to this and test that's working as expected or fix it if not.

ichiragshah commented 4 years ago

Yes this is solved.

function add_additional_urls( $url_queue ) {
    $additional_urls = [
        _'my_url_here'_
    ];

    $url_queue = array_merge(
        $url_queue,
        $additional_urls
    );

    return $url_queue;
}

add_filter( 'statichtmloutput_modify_initial_crawl_list', 'add_additional_urls' );

Adding the above snippet in functions.php helped me