The tag has no usage guidance.

learn more… | top users | synonyms

10
votes
1answer
8k 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 ...
7
votes
2answers
134 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 ...
2
votes
4answers
3k views

Wordpress 3.5 Gallery Menu Order not set?

With the new Gallery editor in Wordpress I am able to set up my galleries and to drag the Thumbnails to re-arrange the image order. On the backend that seems to work fine. But I ran into an issue when ...
2
votes
1answer
376 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 ...
2
votes
0answers
91 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 ...
1
vote
2answers
5k 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?
1
vote
2answers
695 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
1answer
90 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
220 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, ...
1
vote
1answer
540 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 ...
1
vote
1answer
2k 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, ...
1
vote
0answers
29 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 ...
1
vote
0answers
588 views

Get Woocommerce variations order / sorting

As I can see the order of the variations on a variable product is done via the "menu_order" data of the variation. What is the most efficient way (in terms of backward compatibility and code quality) ...
1
vote
1answer
149 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), ...
1
vote
1answer
1k views

get_pages() as per custom menu order

I'm working on Single Page WordPress Theme where I want to get_pages() as per custom menu order. I have gone through the reference for get_pages() which only allows for default menu : ...
0
votes
1answer
716 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
2answers
727 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 ...
0
votes
1answer
822 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' => ...
0
votes
1answer
172 views

Exclude pages by menu order

i have a "Default Page Generator" on theme activation i have created... in that file i set 'menu_order' for each page. i want to exclude pages with menu order bigger then 50 from the default ...
0
votes
1answer
108 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
1answer
3k 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 ...
0
votes
2answers
1k views

echo menu_order value in my theme

I thought this would be a simple task, but I cannot find anything on google. I would simply like to echo the meun_order value in my loop. I tried this but it's not in the post_meta table, its in the ...
0
votes
0answers
29 views

Menu permalink structure

so I have this problem... it's stupid one, but I can't handle it properly. On my page www.example.com I need to put big menu structure. I want menu to be structured as ...
0
votes
1answer
40 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 ...
0
votes
0answers
18 views

Custom menu problem

I have following menu coded under header.php and i want to add an page under a category menu as an example instead of 36 (category id) i want to display the page id 8197 P.S. i tried to remove the ...
0
votes
0answers
13 views

Multiple menu overriding

I have two menu, next to each other but when i wp_nav_menu() my first menu broke down, as its dependent on jquery. Am i missing something in my code> function register_my_menu() { ...
0
votes
2answers
324 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
55 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
48 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 ...
0
votes
0answers
97 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. ...
0
votes
2answers
303 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 ...
0
votes
0answers
359 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
205 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
235 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 ...
0
votes
2answers
61 views

Echo order box (in pages)

How can I echo the value of the order box in posts? See photo.
0
votes
1answer
79 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 ...
0
votes
1answer
130 views

Compare string with post id in wpdb and do stuff when match is found

I'm looking for some help tying in with the wpdb to compare and change certain values. I'm very novice with mysql handling so I really appreciate any help on this matter! What I want to do is to go ...