Hi to all, I write a little script to insert topics on Google XML sitemap plugin.
You have to add this script in Google XML sitemap plugin. Exactly on the file sitemap-ui.php
This is the code:
// ADD TOPICS TO SITEMAP
$posts_args = array(
'orderby' => 'created',
'order' => 'DESC',
);
$topics = WPF()->topic->get_topics_filtered($topic_args);
foreach( $topics as $topic ){
$topic_url = wpforo_topic($topic['topicid'], 'url');
$topic_url_ok = esc_url($topic_url);
// $topic_url_html = esc_html($topic['title']);
// $topic_created = esc_html(wpforo_date($topic['created']));
// $member = wpforo_member($topic);
// $member_link = wpforo_member_link($member);
// $avatar = WPF()->member->avatar($member);
$p2=new GoogleSitemapGeneratorPage();
if(substr($topic_url_ok,0,4)=="www.") $topic_url_ok="http://" . $topic_url_ok;
$p2->SetUrl($topic_url_ok);
$p2->SetProprity('0.8');
$p2->SetChangeFreq('weekly');
$p2->setLastMod(0);
//Add it to the array
array_push($pages,$p2);
}
// ADD TOPIC TO SITEMAP
You have to add the code before the last line of the function: public function HtmlApplyPages()
<<< HERE
return $pages;
This hook will add topics to this sub-sitemap:
sitemap-externals.html
Hope this can helps other peoples.
www.carloscastanedaforum.com
Please wait for next wpForo release. We're currently working on wpForo sitemap. It'll be available soon.
Please wait for next wpForo release. We're currently working on wpForo sitemap. It'll be available soon.
What excellent news! Thanks!
Please wait for next wpForo release. We're currently working on wpForo sitemap. It'll be available soon.
very nice!
this plugin is going to be a massive revolution!
Keep it up!
wpForo built-in sitemap is already available with just released 1.5.2 version. More info in release summary: https://wpforo.com/community/wpforo-announcements/wpforo-1-5-2-is-released/