The order tag has no wiki summary.
8
votes
3answers
4k 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 => ...
6
votes
2answers
113 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
5answers
707 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
4k 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' => ...
4
votes
1answer
304 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" ...
3
votes
1answer
1k 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 ...
3
votes
2answers
686 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
601 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
296 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
486 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 ...
3
votes
2answers
112 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
153 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
173 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
187 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
4answers
164 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
2answers
191 views
Orderby = none not working
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
281 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
255 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
60 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
139 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
194 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
0answers
100 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
1k 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
1answer
24 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
638 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
3answers
482 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
1answer
83 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 ...
1
vote
2answers
236 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
704 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
405 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
198 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
2answers
627 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
1answer
149 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
1answer
1k views
Wordpress query_posts and orderby page order
I have a page that lists all sub pages of the current page. Each page has been assigned an order number in the wordpress editor but they aren't ordering for some reason.
I'm set up like this:
...
1
vote
2answers
160 views
Wp_query: sort by PHP variable
Here is my problem:
For my articles, I use a custom post type "exhibitions" and posts for all other news. I am displaying them in one query ['post_type' = array('exhibitions','posts')].
The orderby ...
1
vote
1answer
51 views
Make Images appear in the same order as in media browser using get children?
I would really like my images to display in the same way I've ordered them in the media browser. What am I doing wrong?
$images =& get_children( array('post_parent' => $post->ID,
...
1
vote
1answer
73 views
Order posts by price
I have a list of products on a page and am trying to order them by a custom field called "price". Unfortunately, $3,950,000 is coming before $349,000. I've used a couple of codes but neither one is ...
1
vote
2answers
81 views
How do I sort posts with multiple pages
I am using a drop-down to sort posts by title, meta_value, etc. However, the sorting feature only works on the first page. The second page displays the default order rather than continuing the order ...
1
vote
1answer
106 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:
...
1
vote
1answer
41 views
All, published and pending order
On the list tables of the administration panels, I want to change the order of the filters on top of the table.
What I want:
Pending
Published
All
I tried to act on a line from the ...
1
vote
1answer
192 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 ...
1
vote
2answers
918 views
How to Change the Categories Order in the Admin Dashboard?
The order of categories on dashboard is alphabetical. Can I change it to custom order?
1
vote
1answer
892 views
Sort query_posts for Parent Pages to menue order or the count?
thanks to a member here i display my Parent Pages in a 2 column grid with title and excerpt. But for some reason i can't figure out how to sort all 5 Pages by the menu order for example or the order ...
1
vote
1answer
44 views
Change order of posts
I made a post recently that did not explained myself right!
Come again, but with better explanations.
I need the "Select Option" change the order of query_posts.
My current code is:
<select>
...
1
vote
2answers
50 views
I want to display the all the posts that are inside a certain subcategory
I want to display the all the posts that are inside a certain subcategory in a specific order that I decide (this is because the category contains a list of tutorials and I want to decide how to list ...
1
vote
2answers
38 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 ...
1
vote
2answers
70 views
List upcoming events, ordered by date in a custom field
I want to display a list of events with dates in upcoming order. Ex:
23 March, 2013,
30 March, 2013
Below is the query I'm using to filter out posts from my database:
query_posts(
...
1
vote
0answers
86 views
group posts by taxonomy terms
I have a site with two CPT's Projects and Artworks. I use scribu's posts2posts for connecting a bunch of artworks to each project.
In a single Project view, I want to display all connected artworks. ...
1
vote
1answer
130 views
WP_Query orderby breaks when using AJAX?
I'm running in to a bit of a problem.
I have a function called get_press(), it retrieves newest press items. It is inside of a plugin:
class EWPress {
function __construct()
{
...
1
vote
1answer
92 views
query order by date on custom type: wrong order
I know there are very similar questions ans answers out there already, but I simply cannot get my query to get into the right order.
I have a custom post type ("bb_articles") with custom fields, ...
