Hi there,
One quick question, we have sort order set to post “Title”.
We we want to find out if there is a need to over ride this to move one post up the menu say its seasonal like a special or school holders.
Is there any way we can create a way to move items up the menu? Wondering if there is a filter option to override the sort order based on a custom tag or taxonomy possibly?
OnPoint Plugins
Hi Dion,
There are 2 approaches to sorting specific items to the top:
Change order to “Page Order”.
This will allow you to place items in whatever order you would like using the page attributes. You may also use the Simple Page Ordering plugin if you would like to using drag sorting.
The upside is you can put pages in whatever order you like. The downside is you have to manually adjust orders as ordering automatically by “Page Title” will no longer be available.
Using a filter.
If your pages or post type support categories, you may use the id of category to automatically move assigned pages to the top of the menu by adding the following filter to your active theme’s functions.php file and changing “66382” to your category’s id:
If your pages do not support categories you may add support with the following filter:
Have a great day!
Dion Bairle
Thanks for this, I am using post hierarchy but in my custom post type I did set a category but it did not move the item to the top.
Included details in the private section for your review thanks!
OnPoint Plugins
Hi Dion,
It appears you are using a
move-to-top
custom taxonomy. If you change the provided filter to usemove-to-top
instead ofcategory
it should work as expected.Have a great day!