The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
0answers
16 views

Get Woocommerce variations order / sorting

As I can see the order of the variations on a variable product is done via the "menu_order" data of the variation. What is the best way (in terms of backward compatibility and code quality) to get ...
0
votes
0answers
8 views

Grouping posts by Custom Taxonomies and wording by date

I have already figured out how to create a loop that pulls posts from a Custom Posts Type that I created and grouping them by terms of a Custom Taxonomies. Sorting of terms Alphabetically works ...
0
votes
0answers
6 views

Secondary ordering and order DESC not working when using meta_value_num

I have this query: $args_members = array( 'posts_per_page' => -1, 'post_type' => 'team_member', 'post_status' => 'publish', 'meta_key' => ...
0
votes
0answers
15 views

Show product category in order email

requesting help with woocommerce... when customer orders something he receives an e-mail and owner of the shop receives an email too. There is the name of a product customer has bought. I want to add ...
0
votes
3answers
21 views

Order post by taxonomy

I am trying to write a get_posts() query to retrieve 7 posts per page. The retrieval of these posts are based on 3 different tags, "Featured","Highlighted", and "News". Now the "Featured" post take ...
0
votes
0answers
11 views

Events calendar custom order issue

I've been trying to figure this out for several hours now and I just can't find a solution, so, I am new to WP. We are using the Events Calendar plugin, and in the calendar view they want to be able ...
0
votes
1answer
33 views

Featured-Content/Featured Posts With Random Order

I am working on dailysuit.de, which features four featured posts at the top, defined by a certain tag. The order is newest to oldest. How do I get this order randomised (and not newest to oldest)? I ...
0
votes
0answers
39 views

Order Custom Field by Price

First of all i've found numerous, topics, and, issues about ordering a WP_Query by its custom field value, but somehow all the proposed solutions don't seem to work for me. I have a custom field ...
0
votes
1answer
23 views

Create a regular post for every WooCommerce order

I'm trying to make a post, which will list product meta(every order will have only one product) and on that post I want to make visible product variations. So the link will be generated and sent to ...
0
votes
0answers
18 views

WP_Query relation AND with two taxonomies and orderby rand, prioritising one taxonomy

I have a wp_query which selects posts from a CPT, using relation AND to select posts from two taxonomies (sector and expertise). I would like the order of posts returned to be random but I would still ...
0
votes
0answers
10 views

Show Comments on Shop Orders Admin page

Any ideas on how I can show comments on shop_orders ? I've commented out WC's //add_action( 'add_meta_boxes', array( $this, 'remove_meta_boxes' ), 10 ); which now shows "discussion" in the screen ...
0
votes
0answers
23 views

Order Custom Post Type by Custom Field - Genesis

I have created my own custom post type and taxonomies with Custom Post Type UI plugin. With Advanced Custom Fields plugin I create custom fields for my Custom Post Type. I'm using WP All Import to ...
0
votes
1answer
38 views

How to order posts by meta value?

All posts are using a custom field "deadline" (format: yyyy-mm-dd). How do I make my category page order posts by meta_key "deadline" and DESC? I use this: if ( get_query_var( 'paged' ) ) { ...
1
vote
0answers
69 views

meta_value_num not ordering all items

I am using meta_value_num to output a list of items in order by a custom field. The custom field value that is being passed is 1, 2 ,3 or 4. The order works for the first 7 items but after that they ...
-1
votes
2answers
113 views

WooCommerce - Show orders for a specific product ? [closed]

How to view orders for a specific product in WooCommerce using sku or product name? What I have so far is that, but it does not work.. Does anyone know how to do? <?php $args = array( ...
0
votes
1answer
57 views

Ascending & descending posts on same page with IF statement

I need to be able to display a list of events on 1 page. The top list would be for upcoming events and to be sorted with earliest event first and the second list would be for expired/past events and ...
0
votes
1answer
55 views

How to make post button to a random post

As you can see on my website http://www.kieshetsnel.nl/emma-watson-natalie-portman/ I currently have an Arrow left and right on the screen. But when i click next post (volgende keuze in Dutch) I ...
0
votes
0answers
59 views

Calculate the total of 2 meta values and ORDERBY

I've configured products in WooCommerce to use a point system (either 0 or 1) using Advanced Custom Fields and would like to order the products by these values - there are 9 options in total per ...
0
votes
0answers
15 views

Update wp.media state (mainly order) of images in Add Media Modal

I have to mimic a feature that was part of Wordpress 3.5 but was removed in Wordpress 4.0. When I am seeing the files uploaded to a post in the Add Media Modal, if I chose "Uploaded to this post", I ...
2
votes
0answers
53 views

sort by date in Advanced Custom Field

I am trying to filter posts with certain values and sort by the date field using ACF module. I have succeeded in filter with package and type. But when i added date sort, its not working. Please help ...
0
votes
1answer
83 views

How to check if a product is purchased within the last 365 days before displaying something

I have a WP site using WooCommerce. Our products are made up of physical stock, a download and some links to pages on our site. I had set this up by placing the links to the specific product pages ...
0
votes
2answers
39 views

Orderby doesn't work like expected on custom query

I have this custom query: query_posts( array ( 'orderby' => 'rr_recommends_count', 'meta_key' => 'rr_recommends_count', 'order' => 'DESC', ) ); Which orders the posts ...
-1
votes
1answer
94 views

Woocommerce Pre Orders view order link wrong [closed]

The link that the pre order module produces in My Account doesn't work. It has to display like this: /my-account/view-order/15977 but how it displays now is: /my-account/?order=15977. How can i change ...
0
votes
0answers
20 views

Child categories by post date

I have created a parent category called " Shows " and have 8 different programs under it. I want to display the most recent post from all categories on first block of my template page. The code I am ...
0
votes
0answers
36 views

“meta_value_num” not working when value is wrapped in html tags

I should start by saying I have little to no knowledge of PHP, nut I am responsible for managing a wordpress site for a restaurant. I have the menu items listed in order of price using the following ...
0
votes
1answer
23 views

Filter query posts by the count of metas for a meta key

I know it is possible to filter queries to order posts by the numeric value of a meta. For example, I store the number of total likes for a post in a single meta key : ...
0
votes
2answers
27 views

get_post orderby not working in plugin

Please take a look at the loops below, I'm having issues trying to order the attachment by title, name, and modified. <?php foreach ($instance['data'] as $id) : ...
2
votes
0answers
72 views

Custom WP_Query order by post_meta and (author) user_meta

I am having an issue that i couldn't find on google and elsewhere. To put problem in the context. I am making a wordpress site where user can put their tutor listing for giving a tutorials, and i am ...
1
vote
0answers
129 views

woocommerce place order using curl? [closed]

I need to place order using curl in wordpress woocommerce. i already tried this but its not working. My error {"result":"failure","messages":" \n\t\t\t We were unable to process your order, ...
0
votes
1answer
33 views

Accidental reverse order of menu items in one menu

On my website I have two menus - one on the top and the second which appears after scrolling down. The order of menu items is correct in "scrolling-menu", and in the "top-menu" it's reversed. What ...
0
votes
1answer
147 views

WP_Query order by date in meta_value

i have a small problem i think. this is my code for my category-releases.php: <?php $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; $args = array( 'posts_per_page' ...
0
votes
1answer
74 views

Custome column sort by date not title

I've created a custom column. Currently they are automatically sorting by title however i want them to sort by date. I've tried adding a "query_post" like: ...
3
votes
1answer
102 views

next and previous post link ordered alphabetically

I found a snippet, which order all posts alphabetically. I wonder if is there a way to make it working just for one post-type? I have some custom post type in my website, and i want one of them to be ...
0
votes
0answers
23 views

Show custom field value in Edit order / Print invoice page

I've got the following in my functions file: if ( isset( $_POST['university'] ) ) { update_user_meta( $customer_id, 'university', sanitize_text_field( $_POST['university'] ) ); } This in my ...
0
votes
0answers
48 views

order posts with conditions & meta_key merge

i want a code to orders my blog posts using a "conditions" & combinaisons of 2 meta_key so details: if ( postviews < 20 views in exmple) ==> those posts order with date ==> here ...
1
vote
2answers
116 views

Order by menu structure

As I'm making one page website. Here is question I asked earlier: Calling Specific Pages with wp query Part II As I'm calling all pages by WP_Query which is "order by = ASC" I want to call it "order ...
5
votes
1answer
172 views

Select all in parent category, group by child category?

I am trying to format a custom post type for a "series". Each post is an Episode, each Episode belongs to a Season, and each Season belongs to a series (just like a TV show). I have the following: ...
2
votes
1answer
119 views

WP_Query sort by comment meta data

Is it possible to use the WP_Query class to order by comments meta data fields?
0
votes
2answers
60 views

Get posts ordered by meta data

I have a post type gtre and metadata price. The 'price' metadata I get using get_post_meta($post->ID, 'key', true)["price"]; So I don´t know how exactly should I write the args for WP_Query ...
0
votes
0answers
68 views

Change order custom taxonomy

I've created a custom taxonomy BH Job Regions . Now I would like to change the order of the terms in my taxonomy list. Is there a plugin or so that I can do this in my backend? Drag the terms in ...
0
votes
1answer
30 views

Post ordering not working with custom field

I am trying to create an Events CPT with a widget, and can't seem to fathom out how to get the ordering done right. My arguments that I have are: $event_args = array( 'post_type' => 'event', ...
0
votes
1answer
67 views

Filtering by multiple conditions in the loop

I'm trying to filter the posts in my index by multiple conditions. So far I've tried with this: <?php $query = new WP_Query( array( "post__not_in" =>get_option("sticky_posts"), ...
0
votes
1answer
59 views

Alphabetical order in taxonomy.php

I created custom post types and a taxonomy-adhesion.php file (by copying the contents of the archive.php file). I wish the search result would appear in alphabetical order (or by title), but it does ...
0
votes
1answer
131 views

User list order by user meta

i have created user vote that can vote users or author of posts. so for example have 4 users which looks: user --- ID=1 --- META KEY='_thumbs_rating_up' --- META VALUE='13' user --- ID=2 --- META ...
1
vote
1answer
85 views

Complex WP_Query order request: DESC by day, but then ASC by time

I've got a site with a couple thousand time-stamped posts in a custom post type. These get displayed by a few taxonomies and a date query in various views (I've got that all working just fine ...
0
votes
1answer
34 views

Using orderby with 2 meta keys

I can use orderby with one meta key in the WP_Query using following: 'orderby' => 'meta_value_num', 'meta_key' => 'my_key_1', However is it possible to use orderby based on the calculation ...
0
votes
1answer
62 views

WP_User_Query orderby meta_val_num

I know that normal WP_Query's can have an "orderby" parameter of "meta_value_num", but when I try to user "orderby" => "meta_value_num" on a WP_User_Query, it doesn't seem to work. Anyway I can ...
0
votes
1answer
25 views

Creating a post that contains a list of other posts like a table of contents

Is it possible for a post to contain a list of other posts, with a custom ordering like a table of contents? Similiar to the above but is it possible to create a category with a custom ordering of ...
1
vote
1answer
197 views

How to order a post type with meta_value_num and if meta_value_num does not exist then order by date

I want to order a list of post on basis of ratings. I have used meta key "wp_ratings" for storing the rating value in wp_postmeta table. Now I want to sort all posts . If a post does not contains the ...
0
votes
1answer
131 views

WP_Query custom order and pagination

I am seeing some strange behaviour when combining a custom order with pagination when using WP_Query. The arguments for my query are as follows: $args = array( 'post_type' => 'news', ...