[Plugin: Google XML Sitemaps] Change Post Priority
-
I wanted to change the priority and change freq. of one page on my site. I wrote a little code to use the get_post_meta() for the unique values, which I stored using “Custom Fields” on the edit_post page.
$my_post_prio = 0; $my_post_prio = trim(stripcslashes(get_post_meta($post->ID, "sitemap_priority", true))); if ($my_post_prio) { $prio = $my_post_prio; } $my_post_cf = 0; $my_post_cf = trim(stripcslashes(get_post_meta($post->ID, "sitemap_change", true))); if ($my_post_cf) { $the_post_cf = $my_post_cf; } else { $the_post_cf = $isPage?$cf_pages:$cf_posts; }It’s not perfect, my change frequency comes out lowercase in the sitemap, it makes too many database calls to get the metadata. And it doesn’t fit into the exiting object oriented methods of changing the priority.
Hopefully, someone can take this suggestion and incorporate it into Google XML Sitemaps.
Thanks,
Wiseburn
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘[Plugin: Google XML Sitemaps] Change Post Priority’ is closed to new replies.