The order tag has no wiki summary.
3
votes
2answers
210 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 ...
1
vote
2answers
72 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
47 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
89 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(
...
0
votes
2answers
190 views
get_terms orderby name as numbers
I have a custom taxonomy filled with terms such as 'volume 1', 'volume 2', 'issue 1', 'issue 2', 'issue 10' and get_terms orderby name returns list as:
issue 1, issue 10, issue 2 though I need it to ...
0
votes
2answers
144 views
Multiple Orderby's using random order WP_Query
Here is the setup.
The site in question is a website that displays listings. Each listing has a rank (1-3). Basically it's a listing type... small, medium & large to determine how much the ...
1
vote
1answer
27 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 ...
1
vote
1answer
54 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
1answer
147 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
165 views
WP_Query - filter by multiple meta values and order by other meta values
I'm trying to query posts using WP_Query and meta_query parameters:
$args = array(
'post_type' => 'produkty',
'meta_query' => array(
'relation' => 'AND',
...
1
vote
1answer
84 views
Custom order for Mysql array
I have a Page of Posts, each post has a Custom Field "expired" which contains a date in the format YYYY-MM-DD which is used to order the posts. This date is used for a script that tells the visitor if ...
1
vote
1answer
73 views
Sorting a query Field by date
I have my site, which at the moment is display university open-days, at the moment they are sorting by order of page title, when actually I would prefer they sorted in order of date, soonest first, ...
0
votes
1answer
9 views
Customize the Sorting Dropdown in WooCommerce
It would be great if there was a way to change the default sort by dropdown in WooCommerce on the shop page.
Right now the sorting drop down looks like this:
http://cld.wthms.co/OBgj
And I would ...
0
votes
1answer
47 views
AJAX pagination call to get_posts with an offset and a meta_value_num sort returns same post on adjacent pages
I have a simple AJAX pagination that seemed to work just fine, calling one Wordpress page (not ideal, I know) with a pagenum and a sort order arguments and it returned 4 custom posts per call. The ...
0
votes
1answer
14 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
246 views
Transfer taxonomy to custom field
I have a blog with movie critics and I'm using many taxonomies to add some informations about the movies, like director, actors or it's year. Using taxonomies is really useful to display all movies ...
0
votes
1answer
45 views
404 on Pages for Custom Post Type & Query_Posts
It took me quite a while to find a good solution for ordering a custom post type by two custom meta keys. When I finally got it working, I found out the pagination no longer works. I've tried dozens ...
0
votes
1answer
122 views
WP e-Commerce (WPEC) Variations Sorting, Category Order and Taxonomy Terms Order
I'm using the WP e-Commerce plugin (Version 3.8.9.5) on Wordpress Version 3.5.1.
I have created several products (shirts). They all have variations for "Size" (XS to 6XL). The variations are ...
0
votes
1answer
45 views
Order search results by category
I'm using this code to order my search results by post type and title, but I would like to order by category too. How can I do it?
add_filter('posts_orderby','my_sort_custom',10,2);
function ...
0
votes
1answer
62 views
Custom loop of a single category, cannot order by date. What am I missing?
I'm going nuts.
All I have is a simple loop on the home page of the site (which is a static page), and it should show the most recent (1) post of a certain category. The trouble is no matter what i ...
0
votes
1answer
50 views
Order custom fields alphabetically
I've been trying to order the custom fields alphabetically, but I can't get the ordered list I want... this is the code I'm using:
<?php
$vMarca = get_field('tienda_marcas' , false, ...
0
votes
1answer
43 views
Query posts from current year
I don't quite get why this isn't working. I'm trying to use the following to only show posts from the current year on the front page:
<?php query_posts( "&year=$current_year&order=DESC"); ...
0
votes
1answer
80 views
view subcategories order by id
this code to display subcategories in categories page
i need to view subcategories sort as id subcategories
can anyone update this code to view subcategories order by id
<?php
if(is_category()) {
...
0
votes
1answer
73 views
Problem with meta_value order after update
I use following array and works fine...
sort post by meta_key where value of t_count is a number:
$args = array(
'posts_per_page' => 10,
'meta_key' => 't_count',
'orderby' => ...
0
votes
1answer
101 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 ...
0
votes
1answer
392 views
Displaying Portfolio Filter by Category Order (alphabetically)
I have created a custom post type to display churches in Europe. I used this tutorial to make it filterable: http://wp.tutsplus.com/tutorials/creating-a-filterable-portfolio-with-wordpress-and-jquery/
...
0
votes
1answer
149 views
WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
I'm trying to write a new "related posts" widget (for the single post view) for my custom post type, filtering by custom taxonomy terms that the related posts should have in common with the current ...
0
votes
1answer
101 views
WP_Query post at custom position
Lets say I have a custom query which based on two custom post types:
$wp_query = new WP_Query(array(
'post_type' => array('post-type-1', 'post-type-2'),
'post_status' => ...
0
votes
1answer
137 views
How to Order a list of taxonomies? orderby?
I am using this code to fetch a list of child taxonomies. I want the order displayed to be alphabetical, but it is not! Any help in figuring out how to do it? I guess ordering it before returning it ...
0
votes
1answer
23 views
Last three posts not being put in order by date. How to fix this?
My company adds a quote of the day each day. The last three posts that I have put are not in order though. The first quote I posted 3 days ago is at the top the post I posted yesterday is under that, ...
0
votes
1answer
63 views
Random order of posts on each request
I want my testimonials to be shuffled everytime someone clicks on my testimonials page so that it is not the same one on top all the time.
How can I do this? Where should I put the code?
I am ...
0
votes
1answer
54 views
Order by meta values
I have 3 meta fields related to dates:
year = 2012
release_date = 14 November 2012
release_date_db = 20121114
I need to show the posts from year 2012 sorted by release_date.
I made this:
...
2
votes
0answers
102 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. ...
1
vote
0answers
91 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
0answers
219 views
Meta query with multiple custom fields for archives page ordering problem
I'm modifying the query for archives pages so that the posts showing up on year, month or day pages are queried by there custom field (start-date and end-date) and are sorted by custom star-date ...
1
vote
0answers
150 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 ...
1
vote
0answers
136 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
90 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 ...
1
vote
0answers
229 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',
...
1
vote
0answers
233 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
0answers
43 views
Order posts by meta value then by random with pagination
Firstly thank you in advance for your help.
I am creating a directory site. My client needs featured directory listings to appear before standard listing but they also need to be in a random order ...
0
votes
0answers
88 views
wp_query orderby value not from meta_value
I'm using the myreviewplugin to add ratings to posts. I'm now working on the posts loop and customising the query using wp_query.
Everything is working fine, but I need to expand the orderby ...
0
votes
0answers
31 views
Add new field to categories and use it to order get_categories()
I want to personalize the subcategories order using a new category field called "order".
I've been able to create this field using the 'edit_category_form_fields' & 'edited_category' hooks in my ...
0
votes
0answers
48 views
Scheduled Post Meta Update in Wordpress
I have a system that sums up values from various sources and pass those to post_meta in order to query posts in accordance with the order of meta_value_num.
I was successful at passing those value to ...
0
votes
0answers
701 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 ...