Title: [Plugin: Google XML Sitemaps] Change Post Priority
Last modified: August 19, 2016

---

# [Plugin: Google XML Sitemaps] Change Post Priority

 *  [wiseburn](https://wordpress.org/support/users/wiseburn/)
 * (@wiseburn)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/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)

 *  [johdah](https://wordpress.org/support/users/johdah/)
 * (@johdah)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-google-xml-sitemaps-change-post-priority/#post-1008861)
 * Simple solution, nice. I would like to have something like this incorporated 
   into the plugin as well

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Google XML Sitemaps] Change Post Priority’ is closed to new 
replies.

 * 1 reply
 * 2 participants
 * Last reply from: [johdah](https://wordpress.org/support/users/johdah/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-google-xml-sitemaps-change-post-priority/#post-1008861)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
