Google XML Sitemaps
Set Priority based on custom field (2 posts)

  1. sjs382
    Posted 5 years ago #

    This all has to do with a custom post type, not posts or pages.

    I've built an online store using WordPress and custom post types. I have a custom field "sold" that can have a value of "TRUE" or "FALSE". I want to set the sitemap priority of the "TRUE" (sold) items to 0.1 while keeping the existing items at 0.8.

    How can I do this?


  2. sjs382
    Posted 5 years ago #

    My solution was going to be to just query the metadata for the $post->ID (after adding a "global $post;" to the function) within the Render() function and then overriding the value set there, but custom post types don't seem to support an ID tag? The post ID only appears for me for pages.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google XML Sitemaps
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic