Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [menu-order]

The tag has no usage guidance.

1
vote
1answer
32 views

Change default ordering of taxonomy terms - pre_get_terms

I wanted to change the default taxonomy terms order by its 'term_order' value instead of 'name' in admin side. So I tried something like below. But it doesn't work and php memory exhaust. function ...
0
votes
2answers
41 views

How to get_posts where 'menu_order' is more than 0/zero?

Is it possible to get posts where menu_order is more than 0? I have tried this argument when I get_posts() but it doesn't have any effect at all: 'meta_query' => array( 'key' => '...
0
votes
0answers
10 views

wp_nav_menu_items add custom item 2nd, not last

I have this function that adds menu items to my menu...My question is, is it possible to have them 2nd in the menu and not last? function ur_add_loginout_link( $items, $args ) { if (...
0
votes
0answers
35 views

How to order WP_Query by parent for hierarchical Custom Post Type?

How can I get all items under specific parent and order them by menu order in hierarchical Custom Post Type? Lets say I have this posts structure: Fruits Apples Bananas Plum Cherry Vegetables ...
0
votes
1answer
338 views

I Changed the Menu Order, But the Page Order Didn't Change on Front Page

First-timer here! I'm trying to change the order of pages on my boardgame webpage, as displayed on the top banner www.mangakagame.com . Basically, I've used "Edit" in the Dashboard and adjusted all ...
0
votes
0answers
155 views

Max Mega Menu - Change it to alphabetical order

I have a max mega menu plugin on my website. I would like a single dropdown, with 5 columns. I would like to put the menus in alphabetical order, underneath each other, but when i try to move them, ...
0
votes
1answer
27 views

Add item to top of menu using a filter in functions.php

I want to add a logo to my main menu. I am using this function: add_filter( 'wp_nav_menu_items', 'add_logo_to_menu_item', 10, 2 ); function add_logo_to_menu_item ( $items, $args ) { if ($args->...
0
votes
1answer
927 views

Orderby menu_order not working; menu is sorted on publish date

I have made a menu in the admin page ordered like this: parent - child 1 - child 2 - child 3 parent - child 1 - child 2 - child 3 parent - child 1 - child 2 - ...
0
votes
1answer
564 views

How to change custom post order ASC/DESC menu_order wise dynamically?

I have created custom post type in back end with sort menu_order post as you can see in the screenshot. http://prntscr.com/gacw95 In back end sorting ASCENDING/DESCENDING working fine. But I need to ...
0
votes
1answer
671 views

WordPress Admin Menu Order for 'admin.php' pages

I'm using following code to change menu order of WordPress admin panel. function reorder_admin_menu( $__return_true ) { return array( 'index.php', // Dashboard 'separator1', // -...
0
votes
1answer
67 views

Product categories are mixed when creating menu

I created the product categories in woocommerce so cleanly, And when im creating a new menu, its a mess. all are shuffled. Im using flatsome theme. WP-MegaMenu. Please tell me a solution or a ...
1
vote
0answers
75 views

Add to query for the_content() on single page

I have a page template that, firstly, has a loop towards the top in order to display a list of links to testimonial custom posts (I'm using a plugin to re-order posts): <?php query_posts('...
1
vote
1answer
2k views

Woocommerce - Changing the order of the upsell products

Having some trouble with a clients site. We have a product with four upsell products linked, and they display on the site. Only problem is, those products are listed on the page in a seemingly random ...
2
votes
2answers
1k views

Adding a menu item in the admin bar

I would like to add a new menu item in the admin bar. So far, I have done the following: function add_book_menu_item ($wp_admin_bar) { $args = array ( 'id' => 'book', ...
1
vote
1answer
400 views

WP_Query Excluding pages with Order is 0

I have a custom WP_Query with the following arguments $args = array( 'post_type' => 'page', 'post_status' => 'publish', 'meta_key' => 'tile-home', 'meta_value' => 1, '...
0
votes
1answer
371 views

Custom Admin Menu Order for all User Roles

I've reordered the admin menu items through: function custom_menu_order($menu_ord) { if (!$menu_ord) return true; return array( 'index.php', // Dashboard 'edit.php?post_type=page', // Pages ...
0
votes
1answer
58 views

Display query post based on two orderby value in wordpress

I have been trying to display popular posts (based on view counts) and fetching them randomly using array in orderby but it doesn't seem to be working. The reason I want them to display randomly is ...
4
votes
1answer
2k views

wp_list_categories: order by term order?

I am currently using WordPress' wp_list_categories function in order to retrieve my terms from a specified taxonomy. I like this function for its ability to generate (hierarchical) HTML lists, that ...
0
votes
1answer
84 views

Beyond widget side menu editing, with the php page, custom template

Looking to reorder the side sub navigation to match the postings. How would I do this? Here is the page: http://www.testdevices.com/about-test-devices/staffexperts/ This is NOT controlled in the ...
3
votes
2answers
2k views

Reorder custom submenu item

In the Settings menu, I have the following menu items listed: Settings -- General -- Writing -- Reading -- Discussion -- Media -- Permalinks -- Blogging I'd like to the Blogging (options-general.php?...
2
votes
1answer
578 views

Menu position (admin menu) of pages

Is there a method to change the menu position of the 'pages' post type? When registering new custom post types, you can enter an integer in menu_position but how do I do this for the preregistered ...
1
vote
3answers
4k views

How to change admin menu position of “Media”?

I would like to change the priority/menu order of the "Media" admin page. Is there a way to change that via apply_filter? Is there a way to change only "Media" page priority without having to list ...
0
votes
1answer
644 views

How to sort a sub-menu, generated with get_pages(), by the page order instead of alphabetically?

I want the top nav on a wordpress site to automatically show the child pages. I know that I can edit my menu and add the children, but I want them to appear automatically, and for the menu to update ...
1
vote
0answers
80 views

Menu items suddenly are displayed all over the page [closed]

Strange things are happening :( When you take a look at the site: www.handelbijvanandel.nl you will see that all menu- and submenu items are shown on the page. At first I didn't pay much attention to ...
2
votes
1answer
3k views

New page does not get a menu_order

The problem is that the order of the home page is not correct anymore. The new items are not in the same order as the menu, even though this is active: 'orderby' => 'menu_order', 'order' =&...
1
vote
1answer
539 views

previous next with custom-post-type by order attribute

I have a custom-post-type called 'artists'. I list them by the order attribute (menu_order). $args = array( 'post_status' => 'publish', 'post_type' => array('artists), 'orderby'=&...
0
votes
2answers
3k views

How to change the position of menu item?

How do I change the position of the Products menu? I created it by hard coding, using the code below. add_filter( 'the_content', 'filter_ptags_on_images' ); add_filter( 'wp_nav_menu_items', '...
0
votes
2answers
87 views

Wordpress altering my custom query, How to fix it?

I am querying for most popular posts by custom view count by using the custom query below, <?php $mostpopular_args=array( 'post_type' => 'post', 'orderby' =...
0
votes
1answer
106 views

Menu order of parent menu from perspective of child menu

I have developed a theme which has a parent menu and a sub-menu. It looks something like: Main menu ==> category | price | depot sub menu for category ==> tag| name | date (show/...
0
votes
1answer
2k views

If orderby parameter using pre_get_posts is the same for multiple posts what fallback does the query use?

So I have 3 custom post types that I want to order by menu_order & have 'date' as the fallback parameter as the majority of posts will have the default menu order of '0'. It would be nice if ...
0
votes
0answers
351 views

Query posts from multiple post types sorted by overarching menu order

I have three different post types named activity, publication and project. I want all posts from these three post types to appear on one page on my website ordered by an overarching menu position. ...
1
vote
1answer
312 views

How to set multiple `orderby` in query argument?

I am trying to fetch pages by multiple ordering. menu_order in descending and title in ascending. Following is the argument: $args = array( 'post_type' => 'page', 'posts_per_page' => 20, '...
3
votes
2answers
1k views

How do I order pages and categories by ID or name in the same query?

I would like to query most of my pages and categories on the homepage. So far I am able to get the pages and category (posts), but I cannot order the list the way I want to. I want to be able to get a ...
1
vote
1answer
226 views

Is there a way to order posts and custom post types as one group?

I have tried several plugins which seem to purport to do this (like this one), but they either don't or are very poor in their implementation and cause problems (the one linked seems to randomly ...
0
votes
2answers
2k views

Logout hyperlink within a sub-menu

I have the following secondary navigation menu on my website which has been built using the native WordPress Appearance > Menus feature: I am also using the following lines of code in my functions....
0
votes
0answers
835 views

How do I get post attachments in menu_order in Wordpress?

I'm struggling to get menu_order to work for images attached to a post. I am trying to pull all of the images attached to a specific post in the order specified via the drag-and-drop interface in the ...
0
votes
1answer
355 views

Creating and populating custom nav menu (menu-item-position not working)

Im automatically creating pages with the below code, after that I create a custom menu and insert all the pages to this menu. $create_pages = array('Home', 'About', 'Contact'); // there will be more ...
0
votes
1answer
503 views

Order posts by separate menu order for different sub-categories

My scenario is as follows: Categories: 1. Category A - Sub-Category A1 - Sub-Category A2 - Sub-Category A3 2. Category B - Sub-Category B1 3. Category C 4. Category D The ...
2
votes
1answer
837 views

menu_order not working with slugs that start with admin.php

I am filtering the menu_order hook (codex link -> http://codex.wordpress.org/Plugin_API/Filter_Reference/menu_order) to change the order of my links in the admin menu. Currently the ordering will not ...
7
votes
2answers
141 views

Are there any reasons you can't use strings for admin menu positions?

When interacting with the admin menu, for instance via add_menu_page, there is a $position parameter. The inline docs indicate that this should be an integer. The Codex agrees, but adds a note that ...
0
votes
2answers
65 views

Echo order box (in pages)

How can I echo the value of the order box in posts? See photo.
0
votes
2answers
2k views

Why isn't my multiple orderby working?

I have a custom category page with the following query: $args = array( 'cat' => $portfolioCategories, 'posts_per_page' => $itemsPerPage, 'orderby' => '...
1
vote
2answers
1k views

Change position of media in admin menu

Is it possible to set the position of an item in the admin menu? I'm trying to move the media link under my custom post types. I know that the media link is position 10. Is it possible to set it to 14?...
0
votes
1answer
169 views

List CPT by menu_order with children right after parent

I registered a custom post type drawer where my posts are ordered using menu_order. Each drawer could be a child of another drawer, on a multiple depth (parent > child > child of child > child of ...
1
vote
2answers
2k views

Resetting menu_order to 0 for posts in PHPmyAdmin?

Installed a plugin that allows the re-ordering of posts from any post type / category / tag using a drag/drop interface. After some time of using, my post order went haywire and new posts began to ...
1
vote
4answers
10k views

Order terms by term_order

Context Post Type: Resources Taxonomy: Media Type, Term: Audio Taxonomy: Series The following code displays a unique list of the custom taxonomy "Series" I want to order the list by term_order, but ...
19
votes
1answer
31k views

How to use “menu_order” field for posts?

I have a special case where I'd like to order posts in a custom order and it would be great to use the "menu_order" field that is normally only used for pages. What would be the best way to expose ...
0
votes
1answer
4k views

Sort get_children by menu_order

I'm using the jQuery Carousel Gallery and unfortunately it's not working with WP's new v3.5 gallery ordering. When the client drags to rearrange images, those changes are not reflected in the front-...
7
votes
2answers
13k views

Get current menu_order

WordPress implements a simple order functionality by default. What's the common method, to retrieve the menu_order for the current post or page?
2
votes
0answers
104 views

Page Attachment Permalink Structure based on Menu Order?

I've been on a quest for the past couple of days reading up on Rewrite in WordPress but still can't seem to figure out how to accomplish this. When using pretty links in WordPress, media attached to ...