The tag has no wiki summary.

learn more… | top users | synonyms

10
votes
3answers
9k views

Adding 'menu order' column to custom post type admin screen

I want to use the menu order attribute to control ordering for a custom post type that's going to be used for a specific purpose. It's easy enough to add this to the CPT via supports => ...
8
votes
1answer
2k views

Is it possible to paginate posts correctly that are random ordered?

I found this problem on Wordpress Support and the topic unfortunately is now closed. I have this same issue... (read below) We have created a site where members can recommend things like favourite ...
7
votes
2answers
193 views

alphabetically order role drop-down selection in dashboard

The site I'm working on will have a very large number of unique user roles via a members plugin. Because of that, I'd like to have the Role drop-down selection on the Add New User page to display ...
5
votes
1answer
10k views

WP_Query - Order results by meta value

I've checked around and haven't seen an answer which works as of yet. I have a WP_Query with the following arguements: $args = array( 'post_status' => 'publish', 'post_type' => ...
5
votes
5answers
1k views

Different post sort order within different categories

I need to give each post a unique post order for multiple Categories (per post) it is in. I can imagine a solution using custom fields whereby for each Category there is a corresponding custom field ...
4
votes
1answer
1k views

Sort posts by popularity/page views

How can I sort posts by popularity or page views in my template file? I guess I need to count page views first, is there any good plugin to integrate with to sort posts by views or what is the best ...
4
votes
1answer
340 views

Re-order media links?

I'm trying to re-order the links in the media box when selecting an image. I want to move "Use as featured image" above the insert into post button. I also want to rename the "Use as featured image" ...
4
votes
2answers
96 views

Order by optional meta key?

I'm building the sorting functionality for a custom post type, and I have a custom meta value for "Featured" posts. This value is set when you tick the checkbox, otherwise it is not set. Using the ...
4
votes
5answers
721 views

Sort on meta value but include posts that don't have one

I've been modifying the built in WP search using the pre_get_posts filter, allowing the user to sort the posts (including a bunch of custom post types) by different fields. The problem I'm having ...
3
votes
2answers
752 views

Show child pages by menu order using Superfish Dropdown menu?

I'm using the superfish dropdown menu to create a drop down menu. It's created the menu fine showing all the parent pages with the child pages in drop down's below. The only problem I have is that ...
3
votes
1answer
1k views

How can I custom order the results from wp_list_categories?

I am using wp_list_categories to return (you guessed it) a list of categories within a custom taxonomy. The orderby parameter accepts sorting by ID, name, slug, count, and term_group. Is there a way ...
3
votes
1answer
439 views

Post date vs. event date in Wordpress

If I'm creating a WordPress site, what should I do when I have a blog that manages events to keep date events? For instance, in my own case, I'm making a travel blog where some histories have a real ...
3
votes
1answer
287 views

Order posts by ID in the given order

In the back-office of my theme, the users can choose which posts to display in the front page, and they can also choose in which order the selected posts should appear. I have tried like this: ...
3
votes
2answers
138 views

Move admin menu at the end

I installed a plugin for my users in WPMU and I want to make it appear at the end of the admin menu .... I tried this but the menu never appears at the end: function custom_menu_order($menu_ord) { ...
3
votes
2answers
196 views

Order Posts by Closest Numeric Values

I'm using custom post types to display properties and have a custom price field assigned to each post. On the property page I want to display a list of four similarly priced properties, two less than ...
3
votes
1answer
208 views

Is there a way to do multiple ordering on a multiple meta_query?

I'm experimenting with searches and multiple criterias and ordering. Let's say we have a real estate site, all posts have 2 custom fields (price and surface), and we want the visitor to be able to ...
3
votes
2answers
404 views

Sort posts by custom field numeric value using dropdown

I've read umpteen answers and questions about things that are very similar to this but I just can't get it to work for my specific situation. I have some posts with a category of "property". In ...
2
votes
1answer
151 views

Arrange and separate posts

On a particular archive page I've created, I'm listing a number of posts by post name and they're listed in alphabetical order. Is there away to have them separated even further? As in all posts ...
2
votes
4answers
443 views

Query Posts in a Predefined Order

I am using the query_posts function to list a 10 specific posts which lookup by post id. I have an array which looks like this.. Array ( [0] => 17983 [1] => 17932 [2] => 18030 ...
2
votes
1answer
1k views

what types of order can I pass to get_posts() via orderby?

Here describes get_posts() function. I would like to know what types of order can I pass to get_posts? in WP admin, I can see menu order, title, date, random and ...
2
votes
2answers
296 views

Orderby = none not working [duplicate]

I'm trying to set 'orderby = none' to my loop but it is not working. Here's my code: $query = new WP_Query(array('showposts'=>2, 'post__in' => array(99,4,5,2,8,55), 'orderby'=>'none')); ...
2
votes
1answer
386 views

Order posts by (hierarchical custom) taxonomy terms and term children

The scenario a custom post type wiki a (hierarchical) custom taxonomy topics a page template archive-wiki.php The situation Posts show up and get ordered by post_date (which is the default). The ...
2
votes
2answers
342 views

Define orderby in url

is there a way to set the order of posts via the url? /orderby/date/order/desc/ i have tried several things with add_rewrite_rule whiteout success. add_action( 'init', 'wpse13483_init' ); function ...
2
votes
1answer
59 views

Custom Post order for homepage

I would like to display a dropdown on the homepage which contains [most popular, most recent, trending] and when a user selects on of them the posts are page reloads and the posts are sorted in that ...
2
votes
1answer
76 views

Order Posts by Taxonomy and Meta Value

It's possible to order posts by Meta Value. It's possible to order posts by more than one value. And thanks to the code below it's possible to order by taxonomy. But how can I alter the code below ...
2
votes
2answers
140 views

orderby=meta_value_num creates duplicate posts

I have my facebook likes stored in a custom field named fb_likes. my wordpress post order is sorted by this field, like this. 'meta_key' => 'fb_likes', 'orderby' => 'meta_value_num', 'order' ...
2
votes
1answer
57 views

I want to order categories based upon the latest post time

For example if category A has post 1 which is created yesterday and category B has post 2 which is created today. So, the category will be listed in order Category B Category A Have anyone ...
2
votes
2answers
550 views

Sorting: custom query with orderby meta_value_num THEN by title

i try to run a custom post type query to match following criteria: sort movies first by year in descending order, after that ("inside" the year order) by title alphabetically. desired output: ...
2
votes
1answer
290 views

How to order by blog ID in this multisite 'List Blogs' custom function

I found this really cool function to list all the blogs on a multisite network install. Because the original multisite list blogs function was depreciated :/ So I am using this function below ...
2
votes
1answer
661 views

Order by meta_key with two meta_queries

This should be simple, but I just can't pinned down a good example of the correct syntax to do this. I want to order by the specified meta_key with two meta_queries. The problem is query_posts ...
2
votes
2answers
460 views

How to order posts tag by tag?

I want to order my posts by tags with only one WP_Query() In my WP_Query I would like to display 2 posts with tags portrait 2 posts with tags paysage 2 posts with tags portrait 2 posts with tags ...
2
votes
2answers
122 views

How to query different post types in specific order?

I have 3 posts types, articles, news and tips. On the home page I want to query 20 posts in this order: article, article, news, news, tip, ...// same order again until 20 If I use a custom query ...
2
votes
0answers
228 views

Trying to perform complex custom field query with order by set to field value

I've got two custom fields for event posts: event-start and event-end. When I'm querying for current events, I'd like to show any post where the event-start OR the event-end is greater than or equal ...
2
votes
0answers
165 views

How to sort posts by last name (2nd word) on ONE category only?

I have an "author" category that is used as a list to browse multiple posts containing author biographies. I have Smart Category Ordering installed and right now it is sorted by title ascending. ...
2
votes
1answer
2k views

wp_enqueue_script order - external vs inline js

I have a few scripts loading with my theme: // loading script.js <script type="text/javascript" src="script.js"></script> // doing something using script.js <script ...
1
vote
3answers
682 views

WP_query 'orderby=none' Problem

I have another database which stores post's IDs and I want do display them using WP_query to use the WP default pagination. I'm using orderby => none to preserve the original order, but the result ...
1
vote
2answers
125 views

order users with drag'n'drop?

There are many plugins out there that let you order Pages and/or Posts with drag and drop. Is there something similar to order users? Or if not, is it possible to create a plugin for that (i.e. are ...
1
vote
1answer
51 views

Reverse chronology of post listing

I"m working on modifying a theme that is based on 2010. I want to make the posts on this blog display earliest to oldest, but I don't see how to do this in the theme: I understand I need to add . ...
1
vote
2answers
3k views

Custom post type - order field

In a custom post type, is there a way to include the "order" field that is available for pages? Is there any built-in logic that prevents duplicate values in the "order" field? The idea is to be ...
1
vote
2answers
1k views

order by second word in title?

I have full names as title posts and want to order it by the surname. How could i do this with wordpress? in PHP it would be along the lines of - SELECT * from posts ORDER BY ...
1
vote
2answers
2k views

Displaying a custom post type alphabetically

I've created a custom post type which now has around 100 posts in it. I simply want to display these in alphabetical order by the post title rather than the default which seems to be most recent ...
1
vote
1answer
3k views

Best Plugin to Reorder Post Types

I'm looking for a plugin that enables me to reorder pages, posts and custom post types from the normal listing in the WordPress dashboard. The closest plugin I've found is Simple Page Ordering ...
1
vote
2answers
306 views

Ordering system through Wordpress

I don't use Wordpress much, but I was wondering if anyone knew whether this would be possible in WP. Basically I want an online ordering system, so just like a normal cart where you can put things in ...
1
vote
1answer
1k views

Order Admin sub-menu items?

I am adding items to a CPT Admin menu using add_submenu_page which works great, but they are added to the bottom of the sub-menu after the CPT options. I want to be able to have them on top , but I ...
1
vote
1answer
456 views

Sorting posts DESC based on the number of comments using WP_Query

I have this unusual requirement from my client that I need to accommodate. They want to be able to view the posts with the largest number of comments first. At first I thought using a custom select ...
1
vote
2answers
40 views

How do I make a custom taxonomy for a CPT appear inbetween title and editor boxes?

This may be a duplicate of this question - Changing the priority of a custom taxonomy's metabox but I can't work out how to apply that answer. I'm unsure what my custom taxonomy div label would be ...
1
vote
1answer
212 views

Arrange posts by date in front page

I have code to show the 5 last posts from every category on the front page. However, at the moment they are ordered category by category. Is it possible to order them by post date, but still have 5 ...
1
vote
2answers
410 views

Order query by post meta value

//Displaying latest post per author on front page function filter_where($where = '') { global $wpdb; $where .= " AND vipwp_posts.id = (select id from {$wpdb->prefix}posts p2 where ...
1
vote
1answer
354 views

Secondary Sort (fallback) for WP_Query

What I'm after is creating a secondary (or default) orderby option for a custom query. Here is what I have: $post_args = array( 'post_type' => $taxfunc_post_type, 'meta_key' => ...
1
vote
3answers
1k views

How can I set a default listing order on the admin page for a custom taxonomy? (without plugins)

I'm researching this problem for days without any success... What I want is very simple: to see my custom taxonomy terms sorted by ID on the admin page. I can't believe that something this simple ...