• Resolved mosterojei

    (@mosterojei)


    Hi, I’m working on our site’s Sitemap but I can’t seem to set the specific priority to specific pages and all the pages as one. It would help if there’s an action hook or filter that can set priority to specific pages.

    Thanks! 🙂

    • This topic was modified 2 years, 6 months ago by mosterojei.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author WP Grim

    (@wpgrim)

    Hello @mosterojei

    We will add filter for Priority and Frequency within a few hours, and let you know about these changes 🙂

    Also, we will try to add Post Meta fields in order to set Custom Priority and Frequency for Pages, Posts, and Custom Posts in next updates.

    Best regards

    Thread Starter mosterojei

    (@mosterojei)

    Thanks a filter would be a great help for now just to have a programmatic approach to specific pages priority, please let me know once it is done.

    Thread Starter mosterojei

    (@mosterojei)

    We are planning to go live this day. Hopefully it will be resolve today.

    Plugin Author WP Grim

    (@wpgrim)

    Already done 🙂

    We have added below filters with 1.7.2 version:

    • sitemap_post_priority
    • sitemap_post_frequency
    • sitemap_term_priority
    • sitemap_term_frequency

    Here is an example for you:

    add_filter( 'sitemap_post_priority', 'my_sitemap_post_priority', 10, 2 );
    function my_sitemap_post_priority( $priority, $post ) {
        if ( $post->ID === 1 ) {
            $priority = 9; // priority from 0 to 10
        }
        return $priority;
    }

    Please let us know if you need anything else.

    Best regards

    Thread Starter mosterojei

    (@mosterojei)

    Thanks! 🙂

    Thread Starter mosterojei

    (@mosterojei)

    That worked thanks a lot. 🙂

    Plugin Author WP Grim

    (@wpgrim)

    We are happy to help you 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Set Priority to specific page’ is closed to new replies.