The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
42 views

Orderby in Query Posts affected by operating system?

I have the following post query: query_posts( array( 'post_type' => 'maze-schedule', 'order' => 'ASC', 'orderby' => 'meta_value_num', 'meta_key' => 'course_date' ...
0
votes
2answers
41 views

Posts and order

newbie here with quick question, looking at all my pages if I click on quick edit I have the chance to place a number on the field order and set an order on which one should appear first,then second, ...
0
votes
1answer
284 views

Ordering Subcategories

I'm using the following code to display data from subcategories. The subcategories are 'United kingdom', 'England Only', 'Northern Ireland Only', 'Scotland Only', 'Wales Only'. Ordering by date or ...
0
votes
1answer
371 views

$wpdb->get_col and ORDER BY?

this is the query that returns the listing of a custom post type $apartments = $wpdb->get_col( " SELECT DISTINCT( post_id ) FROM $wpdb->postmeta ...
2
votes
2answers
173 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' ...
1
vote
2answers
145 views

orderby meta_value breaks taxonomy term archives

I have a People post type with a Person Type taxonomy (e.g. "Staff"). On the Person Type Term Archive pages, I want to sort by a "Sort Name" custom field. To do so, I'm using a pre_get_posts call: ...
0
votes
2answers
82 views

While loop articles - if statement order

I want to show a list of articles, but I want to show in the 1st place my second article and after it the last. Eg: Article 1 Article 2 Article 3 Article 4 to be: Article 2 Article 1 Article 3 ...
0
votes
1answer
59 views

Order by custom field in query multiple

After performing this question, I went to the next step and I wanted to sort the query results by another custom field. I want to sort the results by a custom field that consists of a date and want ...
0
votes
0answers
308 views

Sort users by custom user meta value

I'm trying to sort users by a custom meta value "user_business" which is their business name that way when users are listed they're sorted alphabetically by their business name as they should be. I'm ...
0
votes
0answers
49 views

How to order posts by parents?

I wanted to order my post type archive by its parents (like page list in wp-admin). This is what i have tried, but no luck so far. add_action( 'pre_get_posts', 'budget_archive_data' ); function ...
0
votes
1answer
94 views

single post navigation order (NOT chronological)

in my main loop i show only posts of the 'artworks' post type, orderby=rand. when i view a single artwork and use the next / prev nav, it disregards the main query and goes by chronological order - ...
0
votes
1answer
64 views

Create custom post order (with custom post type meta)

I would like to display my custom post type by specific order. In my custom post type, i've 2 meta : - DAY ( Select : 1,2,3,4,5,etc...) - MONTH ( Select : Janvier, Fevrier, Mars, Avril, etc...) ...
0
votes
0answers
122 views

Order Events by Category or Type, The Events Calendar

So I've using the Events Calendar Plugin which is really working well for what I am trying to accomplish. However, I have run into a snag. I want to organize this query below by displaying an ...
2
votes
1answer
76 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 ...
0
votes
0answers
285 views

Retrieve name or slug from get_objects_in_term

I have taxonomies set up for users, and on taxonomy-{term}.php I have the following code to "loop" them all out, sorted by ID: $term_id = get_queried_object_id(); // Get taxonomy term ID $term = ...
0
votes
2answers
190 views

How to search for articles containing two words?

I'd like to serach my blog for articles that contain the two words bash and variable. There is an article that contains both words, but it is not found. It seems to me that the wordpress search only ...
1
vote
1answer
6k 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
77 views

Order by Custom Field date not recognized

Ok, so I have this custom field wpcf-evento-data-inicio1 generated with the (great) Types plugin. This is how it stores on db: 1372896000 OK, so I want to order by this value. I'm doing it by url ...
2
votes
2answers
951 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: ...
1
vote
1answer
41 views

Show first the posts from 1 specific tag

Is it posible only with 1 loop, to show all posts, but show first the posts in one specific tag? The solutions i found, are using more than 1 loop. If this is not possible, maybe if the post has a ...
6
votes
6answers
2k 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 ...
0
votes
1answer
585 views

WP_Query with several meta_query-statements and order by meta_value

This is my query: $the_query = new WP_Query( array ( 'post_type' => 'pass', 'posts_per_page' => '-1', 'post_status' => 'publish', ...
0
votes
1answer
224 views

Ascending Order is not Working in Custom Post Type Listining

Can you please let me know why this code is not listing Custom Post Types? <?php $loop = new WP_Query( array( 'post_type' => 'product', ...
0
votes
1answer
82 views

Gallery order specified by shortcodes is ignored in gallery function

I have the following gallery order in a shortcode: [gallery ids="1996,2431,372,447,645,641,647,642,649,643,650,648,653,697,652,390"] And I have this function, which creates a nicer looking gallery: ...
1
vote
1answer
359 views

AJAX pagination offset 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
52 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 ...
1
vote
1answer
98 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
1answer
152 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> ...
0
votes
1answer
331 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 ...
2
votes
1answer
406 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 ...
0
votes
1answer
85 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 ...
1
vote
2answers
199 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 ...
0
votes
1answer
122 views

Offset posts with random order

I'm trying to have five advertisement locations, each pulling posts from the same custom post type, but also loading randomly. The only problem I have with my code below is that it will sometimes ...
0
votes
2answers
959 views

Woocommerce: Grab total revenue of a product over all orders

I need to display the total revenue of all orders for my products depending on if the logged-in user is the author of the product or not. I can't use the Quantity field as a multiplier either because ...
3
votes
2answers
144 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) { ...
1
vote
1answer
960 views

How to order separated Custom Post Search results

I am using the technique described here Seperating Custom Post Search Results and here posts_groupby problem to seperate my search results and group them by post type. This means I have the following ...
-1
votes
1answer
2k views

I want to Add My Product Image to Admin Order Email in Woocommerece [closed]

I want to Add my product image (product which is ordered) in a thumbnail form to recognize the product easily by admin, in Admin Order Email.
0
votes
1answer
276 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
300 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 ...
2
votes
2answers
145 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
votes
1answer
529 views

Auto Stock Update after Order cancel from Admin of Woocommerce?

I recently implemented Woocommerce and in trial session I found following issue: 1. Initially, I provide 10qty for Product1. 2. place a Dummy Order from front-end of 10qty of that Product1. 3. Then ...
0
votes
1answer
62 views

Specify strict 'order by' in WordPress query

I have a custom post type called Employees where an employee's name is the post_title of each post. I am trying to figure out how I would sort the post_title column by last name. So for instance, if ...
0
votes
1answer
240 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
274 views

wordpress change the loop order by dynamic value

At the moment i have a custom field named "price" to order my posts correctly. The following already works: $query_args['meta_key'] = 'price'; $query_args['orderby'] = 'meta_value_num'; ...
1
vote
2answers
154 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
1answer
443 views

Order taxonomy terms wordpress

It seems like something really simple, however I can't find a good solution to what I am looking for. I created a page template that shows all my taxonomy term of a taxonomy called "news" eg: paper1, ...
0
votes
1answer
73 views

I would like my page editor to be sorted by date created, or updated, instead of in Alpha order, is this possible?

When looking at my "All Pages" they are listed in Alpha order, and I have to scroll through to find what I am updating. Is there a way to have a preference setting that it be sorted by date, without ...
1
vote
2answers
895 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 ...
0
votes
2answers
472 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
37 views

How can i change the order of comments?

I like to have the latest comment shown above. Just under the post. Now the oldest comment is shown. How can i change the order? With regards, Albert