Hi Trisha, Thanks for the kind words, much appreciated! Using the built-in tabs is a little restrictive if you need different settings for each sitemap tab.
However, if you display your own tabs then simply add a sitemap shortcode inside each tab with the specific settings required for each sitemap. This will give you maximum control over each of the tab sitemap settings.
Hope that helps! 🙂
Great idea! I have set up a template using Bootstrap 5 tabs and different shortcodes in each tab. The problem is the News tab will not sort by date, it is still alphabetical. Here is that template code I am using for the News shortcode:
<?php echo do_shortcode('[simple-sitemap types="news-and-events" orderby="date" order="desc"]'); ?>
Can you see any reason why the orderby date would not be working?
Are you using the free or pro version of the plugin?
I just set up a test post type for news and created 5 sample posts, each published on a different date. The shortcode you provided seems to work perfectly for me. Here is a screenshot: https://ibb.co/svqbzJB8
The only thing I can think of is it’s a side effect of the do_shortcode() PHP call or something specific with the particular news CPT you are using.
Wow. This is embarrassing. I still had the original shortcode in the shortcode block in the editor when I added my tabs and the new individual shortcodes to the template. I was seeing the original tabs at the top of the page and never scrolled down to see new tabs below them. Ugh. I’m sorry to have wasted your time. Everything is good now. Thank you.
No problem Trisha, glad you got it sorted. 🙂