The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
3answers
795 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 ...
0
votes
1answer
198 views

Ordering by 'Title' OR 'Custom Field'

I have an issue here that I just can't wrap my head around. Let me jump right into it: Basically I have a site that has 4 order options; -Name Ascending -Name Descending -Price Ascending -Price ...
4
votes
1answer
2k 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 ...
0
votes
1answer
2k views

Order by custom field date with ASC order

I've found several similar question but none of them explains why the below is giving me nothing with ASC order. It works with DESC. Basically it's a query that should list posts where the custom ...
1
vote
0answers
348 views

define orderby URL with meta_key=post_views_count

I want to make an url with meta_key=post_views_count. E.g: http://www.mysampleweb.com/?meta_key=post_views_count&orderby=meta_value&order=DESC So the posts should be ordered by Views. ...
1
vote
0answers
148 views

Manage Columns : order by post_parent's title

I have 2 custom post types : "industry" (page + hierarchical) and "product" (post + hierarchical). This allows me to use Industry for Product's post_parent. On the Product manage screen, I have a ...
0
votes
1answer
1k views

Sort wp_nav_menu() by menu order

I have made a custom menu handler for the back end, sorting the via a drag drop based on CMS Page Order. The problem now is that it seems that it's not possible to sort wp_nav_menu in any other way ...
0
votes
1answer
605 views

show most viewed posts of last days by link?

I use this link to get most viewed posts: http://mydomain.com/?post_type=movies&meta_key=post_views_count&orderby=meta_value&order=ASC But that gives me ALL posts from this post type ...
2
votes
0answers
193 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. ...
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 ...
0
votes
2answers
728 views

Sort custom posts in archive by multiple values: date AND meta key

I have a post type and I want to sort posts in its archive according to two values: by a meta value called "artwork_year" which contains a 4 digit number (year) by post publish date what the query ...
1
vote
0answers
398 views

How to order posts by meta_value and title

How do you order products in WooCommerce so that products are random, but at the same time featured products show first? Here is my code: $args = array( 'post_type' => 'product', ...
0
votes
1answer
1k views

How to choose a sort order (for posts) per category? (ideally when creating a new category)

Assume I have a bunch of posts (articles) in two categories: "upcoming events" (cat=1) and "past events" (cat=2). When listing all posts of a specific category out of those two, category 1 shoud be ...
2
votes
2answers
746 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 ...
0
votes
1answer
2k views

query_posts doesn't order by title

It seems like stupid bug, but how can i order by title? It anyways orders by date! I'm using: query_posts( array( 'post_type' => 'page', 'posts_per_page' => -1, 'orderby' ...
0
votes
2answers
578 views

Check post_date in pre_get_posts

I want to change the order of a feed using pre_get_posts filter. But I want to exclude dates older than today. I see how one could do that if the date were in a meta key, but the date is in ...
0
votes
1answer
611 views

orderby not working for query_posts using array of IDs

I have an array of IDs that i send to query_posts to get the posts (which works fine) but it seems to always put the attachment(562) last even though it is the newest. Also tried title and ASC vs DESC ...
0
votes
1answer
1k views

order posts by meta value on posts page

I've been reading alot about how to order posts by a meta_value, but I can't seem to get it to work for me. My meta_key is called date, and it is stored as yyyy-mm-dd. Here's where I've gotten to so ...
1
vote
2answers
4k 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?
3
votes
2answers
229 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 ...
0
votes
1answer
230 views

Ascending order has strange effects on wordpress loop

I have a custom loop: $args = array( 'post_type' => 'symposia_program', 'taxonomy' => 'days', 'term' => 'day-1', 'order' => 'ASC' ); $query = new WP_Query($args); if ( ...
0
votes
1answer
387 views

WP_Query orderby meta key/value suddely stopped working

I have code that has been working for a long time which when a user clicks a button to order database results by name/value, it gets the results via AJAX from a page that does all the querying. I ...
0
votes
1answer
286 views

Custom WP_Query breaks default behaviour of viewing right post associated with tax-term!

I have a custom-taxonomy for a custom-post-type just like categories. I've used the standard loop in my taxonomy-event_type.php template so far … if ( have_posts() ) : while ( have_posts() ) : ...
1
vote
0answers
404 views

bbPress plugin: forum lists not showing in correct order?

I'm running Wordpress 3.3.1 and bbPress 2.1 (plugin, not standalone) my forums are are not being listed in the front page archive or forum summary pages in the correct order; I double checked many ...
0
votes
1answer
303 views

Order posts by date

I'm a girl and excuse my English. Maybe its easy and I'm dumb to know it. But here is the problem I want to output on the homepage the posts from the lastest 3 days. Like this: 30/03/12 post 1 ...
0
votes
2answers
385 views

Ascending sort order for monthly & category view, i.e. ?m=201204, ?cat=4

I have my posts ordered ascending (from oldest to newest) because I use Wordpress as a website to accompany a book published based on the original blog. To do this I put the following code just before ...
0
votes
1answer
542 views

ASC and DESC separately from orderby

So I got this to sort my posts and it works great: <div class="sort"> Sort by <select onclick="if (this.value) { document.location = this.value; }"> <option ...
0
votes
1answer
840 views

mySQL query. ORDER BY meta_key

I'm fighting this quite long already and start to think I'm missing something big. CPT posts could have or not metadata ( _vip_post [0|1], _thumbnail_id [null|numeric] ). If i query for ...
1
vote
1answer
4k 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 ...
2
votes
1answer
8k views

Using Orderby and meta_value_num to order numbers first then strings

I have a list of products, each with a price in a custom field stored as text such as "2.50" or "5.00" and I am displaying them on the page with a custom query that sorts by the price: ...
0
votes
0answers
1k views

Order by custom field meta_key date and then by custom file meta_key number

I'm trying do order a custom post type page by 2 variables: - first is the custom post type meta_key "date" - then, for posts with the same date, it should be ordered by meta_key "number" I'm willing ...
13
votes
3answers
13k 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 => ...
1
vote
2answers
1k views

wp e-commerce group product by category [closed]

Sorry for my bad english. I have WP 3.3.1 & wp-e-commerce.3.8.7.6.2. On the products page (which use wpsc-products_page.php template) I have list of products. I want to group this products by ...
0
votes
3answers
172 views

Order by title without taking into account 'the'

I currently have episodes from a TV Show that feature bands playing, so for example I have: Moby The Dandy Warhols The Kooks My wp_query looks like this: $loop = new WP_Query(array('post_type' ...
1
vote
3answers
2k 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 ...
1
vote
2answers
317 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 ...
0
votes
3answers
266 views

How to list menu-item- ids in order for wp_nav_menu

I have a nav menu call: 'primary', 'container_class' => 'primary-menu' ) ); ?> The output looks something like this: <div class="primary-menu"><ul id="menu-other-links" class="menu"> ...
3
votes
1answer
508 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
2answers
784 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 ...
0
votes
1answer
474 views

Arrange Posts By Date In Order Of Closest To The Current Date

I have a list of events on a clients website that show in a sidebar. When viewing the homepage you see one event and if you're anywhere else on the site you see two events in the sidebar. I am ...
1
vote
1answer
2k 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 ...
3
votes
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 ...
0
votes
1answer
120 views

Allow admin to determine the order of queries?

I have a custom query that I created to display the team members of a company, but my client has asked whether they can have control over the order in which each team member is displayed. Is this ...
1
vote
1answer
2k views

How to alter query order direction using $query->set('order', 'ASC'); inside a pre_get_posts filter?

According to: http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters Default order is DESC and default orderby is date. In a custom plugin, plugin is applying the following ...
0
votes
1answer
390 views

orderby ignored by wp_query

With the following code, I do not get the result set ordered by titles. No matter what values I give to 'orderby' and 'order', I get the same ordering. The parameters seem to be ignored (or ...
0
votes
1answer
849 views

Changing WordPress sort order for returned child pages

I have a custom WP_Query that looks like this: $this_page_id=$wp_query->post->ID; $images = new WP_Query( array( 'post_type' => 'menu-item', 'post_parent' => $this_page_id ) ); My ...
0
votes
2answers
295 views

Add a custom meta box for client to order CPT posts how they want

Im looking for a way to add a custom meta box to a custom post type that will allow the user/client order the posts to show up how they want on the site. Is this possible? Basically using a very ...
0
votes
1answer
700 views

Posts 2 Posts: query connected — orderby problem

Using Posts 2 Posts plugin I've created 'piece', 'person' and 'collection' custom post types: any piece may be connected to person (with roles 'author', 'conductor' etc) and collection. Now the ...
2
votes
2answers
430 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 ...
12
votes
1answer
3k 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 ...