Display posts from Custom Post Type, group by term, arrange term groups and arrange items within groups by menu order
Display posts from Custom Post Type, group by term, arrange term groups and arrange items within groups by menu order
Display posts from Custom Post Type, group by term, arrange term groups and arrange items within groups by menu order
Seems like the Post Attributes option for Posts has to be added manually. By adding add_action( ‘admin_init’, ‘add_support_for_posts_order’ ); function add_support_for_posts_order() { add_post_type_support( ‘post’, ‘page-attributes’ ); } However, page has a support by default. So, only “post” is to be supported.
Matching by menu_order is easy, like this: $args = array( // find posts with menu_order 4 ‘menu_order’ => 4, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’, ‘posts_per_page’ => 10, ); $query = new WP_Query( $args ); However, larger or smaller option for menu_order is not provided by default in WP_Query. You can still filter the where … Read more
How can I set the default ‘orderby’ and ‘order’ parameters for a REST API call?
Trying query woocommerce product order by menu order and stock status
The problem with grasping implementation for such deeply nested tree is that it is best solved recursively – your code should output post, then output children and endlessly repeat the process for each child until it runs out. However before you spend time on custom implementation you could try to look into existing functions WP … Read more
First you need to get the value from attributes, option page or meta value; if you have an option page you need to call that value: $valuerequired = get_option(‘ctech_valuefromoptionpage’); ctech is the short theme name, and if the attributes field is a meta value $price = get_post_meta($post->ID, ‘price’, true); then you can echo the value … Read more
You can’t set multiple “menu_orders” specifically. There is one spot for that value in the posts table. You should be able to solve this by creating your own category specific menu order with custom meta fields. I wouldn’t call this a difficult project but there is a bit of work to it. You are going … Read more
You don’t set sort_column to menu_order when you call get_pages, so it defaults to sorting on post_title. $pages = get_pages( array( ‘sort_column’ => ‘menu_order’ ) );
Query posts from multiple post types sorted by overarching menu order