Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ for more details.
This question has been asked several times so I thought it was about time I've addressed it. Here's a bit of code that will add all of the static pages that are defined in FlatPress to the site map generator output.

The original article for the site map generator can be found here.

Add this code AFTER the while loop in the sitemap.php file:
$ss = static_getlist();
foreach($ss as $k => $val) {
$s = static_parse($val);
$i = BLOG_BASEURL . '?page=' . $val;
$offset = $fp_config['locale']['timeoffset'];
$d = $s['date'] - (60 * 60 * $offset);
$d = date('c', $d);
echo('<url><loc>' . $i . '</loc><lastmod>' . $d . '</lastmod></url>');

This will put all of the static links at the end of the generated site map XML. The downside is if you are using static pages to define your block parser widgets, those will be displayed too, sometimes that's not desirable I think.


Skip down to comments...
Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
comments powered by Disqus
Other posts you may like...