Sitemap for all WordPress and Pods pages?

0

Is it possible to create a dynamic visual Sitemap as part of my site, that includes both the WordPress pages and Pods pages in the right places?

I have an overall site structure using WP Pages, and I'm using Pods to handle content on some of the 3rd or 4th level pages using wildcard URLs / templates. The function wp_list_pages is fine for building a fully dynamic sitemap, but it obviously doesn't include the Pods pages.

Is this possible to solve?

asked Jun 10 '11 at 10:01

Matt Hill

1

Hi Matt, I also needed that some months ago and figured out how to create a xml sitemap for all of the pods content and certain pods content <code class="variable"><a href="http://www.lohnsteuerhilfe.net/beratung/sitemap.xml">this is a xml sitemap with xsl-styling for only pods content</a></code>. But I think you could simply make the certain selects from your mysql and generate your combines sitemap. This should be a few loops and there you go. PS: Look for my code here: http://podscms.org/qna/questions/1422/anyone-care-to-collaborate-or-improve-this-pods-xml-sitemap-generator @bottom... but maybe the code above my comment is also a good source for your job to do – lenzcom Jun 10 '11 at 6:18
Thanks for the tip. That seems like something quite complex and I'm not much of a coder. I was hoping that this issue might have already been solved in the core Pods functionality. – Matt Hill Jun 14 '11 at 2:39
add comment
enter at least 15 characters

3 Answers

0

Since there doesn't seem to be a non-code-heavy solution for this in Pods 1.9, could one of the devs respond as to whether this will be doable in Pods 2?

answered Jun 14 '11 at 2:40

Matt Hill

1

add comment
enter at least 15 characters
0

I built another plugin called Search Engine, it lets you index your site like Google does and it has an option to build a full XML sitemap. It's possible that you could grab that code that generates the XML sitemap and build an HTML sitemap from that.

As for 2.0, we don't currently have a Sitemap function for Pod Pages in the works, but we're open to anyone's ideas if they think there's a way we should accomplish it. If it then doesn't make 2.0, we can work towards 2.x

answered Jun 16 '11 at 4:49

sc0ttkclark

2936

http://podscms.org/qna/questions/1422/anyone-care-to-collaborate-or-improve-this-pods-xml-sitemap-generator we had a discussion here, as of now this is what can be done, no out of the box solution ive worked on this more, this goes hand in hand with Google XML Sitemaps plugin so there are 2 cron jobs scheduled to first generate a Pods data centric array containing url,last_mod,change_freq,priority this array is written in json format to a file by us since there is a lot of data next there is another function in my functions.php ill provide it below this function is using the hook for XML sitemaps to append this data to the then being generated sitemap too thus the 2nd cron is to generate the sitemap via the plugin itself – acenik Jun 20 '11 at 11:32
add comment
enter at least 15 characters
0

here is the function:

function pods_pages() {
$file = 'pods_sitemap.xml';
$fileHandle = fopen($file, "rb");
$fileContents = fread($fileHandle, filesize($file));
fclose($fileHandle);
$links = unserialize($fileContents);

$count = count($links['url']);
$generatorObject = &GoogleSitemapGenerator::GetInstance(); //Please note the "&" sign for PHP4!
if($generatorObject != null){
    for($i=0; $i<$count; $i++)
    {
        $generatorObject->AddUrl($links['url'][$i],$links['last_mod'][$i],$links['change_freq'][$i],$links['priority'][$i]);
    }
}

}
add_action("sm_buildmap","pods_pages");

answered Jun 20 '11 at 11:32

acenik

1

edited Jun 20 '11 at 11:34

add comment
enter at least 15 characters