The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
4answers
47 views

POSTS list in WordPress by views

I need a code that causes: <?php while ( have_posts() ) : the_post(); ?> List according to the amount of VIEW, is like to list popular posts only that it will enter the table mh_postmeta, and ...
0
votes
0answers
142 views

Send New Order email to Admin on custom Status

I have created my custom order status "Pending Approval" as Default Order Status, Means if a customer order something from store, it will place it under "Pending Approval" instead of "Processing", ...
0
votes
0answers
63 views

Change sort order when using 'orderby' => 'type'

When doing a wp_query with the following parameters: $arg = array( 'post_type' => array( 'activity', 'publication', 'project', 'course' ), 'order' => 'ASC', 'orderby' => 'type', ...
0
votes
0answers
42 views

Ordering posts in chronological order by category

I have pages that populate all the posts within a category. Here's an example. I would like these posts to be ordered in chronological order, but currently it's in reverse chronological order. I ...
0
votes
0answers
23 views

Admin list: sort by default by custom column

I created a custom column like this: if( (isset($_GET['post_type'])) AND ($_GET['post_type']=="sales") ) { function inventory_column($columns) { ...
3
votes
2answers
151 views

How do I reorder (pop and push) items from WP_Query?

I have this piece of code: $normal_args = array( 'order' => 'desc', 'ignore_sticky_posts' => 1, 'meta_query' => array( array( 'key' ...
0
votes
0answers
18 views

Is there a way to sort posts by taxonomy terms? [duplicate]

I was wondering if I could sort posts at all by taxonomy terms? I've read that I can't, but I'm not too sure about that? If so, how do I go about doing so? Sorry for the rather short question. I ...
0
votes
1answer
154 views

Woocommerce - Display product category of product in Orders page

I need to show the product category of product in admin Orders page when a customer make a purchase.Appreciate if any one can help. :) screen shot attached where in need to display product category of ...
0
votes
1answer
69 views

wp_list_categories() by alphabet? (ex. only category titles that start with “A”) [closed]

I have used this code function show_categories_fn(){ return wp_list_categories("echo=0&title_li"); } add_shortcode('show_categories', 'show_categories_fn'); I got the category list but I ...
1
vote
1answer
95 views

Limiting woocommerce line_total decimal length

I am trying to get line_total woocommerce price, but i just cant figure out how to deal with number of decimals. It is now showing price with 4 decimals like 5.5444$ and i want it to show max 2 ...
0
votes
1answer
37 views

How Do I Get My Post Tags to Alphabetize?

I'm using a self-hosted WordPress site with a Child Theme of Twenty Thirteen. After I requested the same question in the above title, the Child Theme's Developer suggested that I come here and attempt ...
0
votes
0answers
71 views

How to filter woocommerce order with category

I want to filter orders by category of products, what I have tried based on research is : $filters = array( 'post_status' => 'any', 'post_type' => 'shop_order', 'posts_per_page' => 200, ...
0
votes
1answer
31 views

Find by post_meta, then sort by post_meta, then sort by date (wp_posts)

I have a custom meta field that I find a list of posts from. This custom meta is a numerical attribute (1-10) and I need to sort by 1-10, but I also need to sort by post date. So if two items are ...
0
votes
1answer
43 views

Query All Attachments and Order by Parent Publish Date

I'm working on a project where I need to query all of the image attachments and then organize them based on the date the post they were attached to was published. The query below worked well, except ...
1
vote
1answer
77 views

get_terms orderby numeric

I am trying to order my terms numeric. But the problem is that nog every term is numeric. So I have the following terms (check image below) which some of them are dimensions and some are others. As ...
0
votes
0answers
41 views

Change BuddyPress Activity Stream Order

Currently, BuddyPress Activity Stream is displayed date order. Latest activity is displayed at first. I need to make it, by recent comments. For a example there is activity called "Nimal became a ...
0
votes
0answers
70 views

SQL / Select users depending on meta value - meta keys, sorted by a meta value - meta key not in the select

I'm trying to select users with one of several meta keys corresponding to a meta value, and to sort the results by a meta value associated to a meta key which is not in the select. In other words, I ...
0
votes
1answer
63 views

Get usermeta info from sql query

I'm using WooCommerce and need to get my users billing name, billing address, billing phone, billing email, etc from wp_usermeta in a good format like this: name,address,phone,email fake name, 123 ...
1
vote
1answer
32 views

Rewrite and custom post type: order by custom field not working

I have a custom post type "placement" with a custom field "position". What I want to do is, on the placements archive page, to order results by the "position" value. I have the following URL rewrite ...
0
votes
2answers
22 views

How to properly get popular Posts by multiple Values

I am trying to display Popular Posts on my website, selected by a mixture of Views and Comment Count. Since views are always way more than Comments, I am multiplying the Comment Count by X, but it ...
0
votes
1answer
38 views

Custom post order when using OR relation

I have a custom post type named Faculty. They can be any of the type MCT, MLT, or MT. MCT -> A, B MLT -> C, E MT -> C, D I want to list all MLT and MT faculty on a page in order by last ...
0
votes
1answer
16 views

Child pages not affected by orderby

My loop won't order the child pages I'm displaying in the order I want them to, neither ASC or DESC. I've already seen many other similar issues, but those were resolved with disabling plugins (which ...
0
votes
1answer
62 views

Display a list of all post from the Author in the author's page (author.php) in alphebetical order

wordpress noob here. I'm trying to get a php code that will list all of the author's post in the author's page, or in author.php file, in alphabetical order. If anyone here knows how, please help.
0
votes
1answer
87 views

Help ordering custom query by Title, Ascending

I have an old project (custom post type query) that needs an alteration and my memory/skill level is lacking for what to do. With the code below, I'm needing to return the first query in alphabetical ...
0
votes
0answers
19 views

Change the priority of multiple custom taxonomy metaboxes

This question has been answered here... Changing the priority of a custom taxonomy's metabox But I need more clarification... How does this work for multiple custom metaboxes? Let's say the ...
0
votes
0answers
198 views

Display Woocommerce Orders for specific author

I tried finding lot of options and used lot of functions so far in my woocommerce theme but i am unable to find any solution for this issue. This platform is my my only hope so far. What I want? I ...
1
vote
1answer
32 views

Problem with orderby

I am querying the terms in a custom taxonomy i have with the following code: <?php $term_id = 2; $taxonomy_name = 'rete'; $termchildren = get_term_children( $term_id, $taxonomy_name ...
0
votes
0answers
38 views

Sort products by custom taxonomy name

I'm trying to sort all products on the shop page by a custom taxonomy category which is in this case product_brand. What I want is when I choose from the dropdown sort by Brand all products to be ...
0
votes
0answers
143 views

How to get posts ORDERBY a custom taxonomy term's custom field?

I have a custom taxonomy program_taxonomy : /* register a common taxonomy for DRAMAS & reality_shows to get post by terms in PROGRAMS page */ register_taxonomy( 'program_taxonomy', array ...
0
votes
1answer
35 views

Configure query with multiple categories in a custom order?

I have a site with posts in 16 categories ("departments"). The home page is a grid of the current (newest) post in each category. I would like to create the HTML for displaying a department's ...
1
vote
0answers
62 views

Why does pre_get_posts() return “date” as the orderby parameter for every sortable column?

I am stuck trying to get a custom column to sort according to a custom field. I have two custom post types: Brand and Product. I would like the Product admin screen to have a "Brand" column, and for ...
0
votes
0answers
19 views

Ordering results by last login date

I want to order posts by a post meta field and last login date. Here I use a custom post type called 'Agents'. Agents is a user group and they can login through frontend. For Agent logins, I record ...
0
votes
0answers
38 views

Post list order by category or taxonomy with URL

I would like order the blog post by my custom taxonomy or if not possible than would like order by category. My custom taxonomy content a year. (2015,2014,2013 etc) I would like make a similar ...
0
votes
0answers
20 views

get posts by specific custom taxonomy in admin area

I know this point was already discussed on several threads but i didn't find the solution. For my project, i need to display posts by a custom taxonomy in the admin panel (using a dropdown button ...
0
votes
1answer
63 views

Weekdays as terms - How to order taxonomy terms by ID in admin panel?

I created a custom taxonomy using following code. add_action( 'init', 'schedule_day_tax_func' ); function schedule_day_tax_func() { register_taxonomy( 'schedule_day_taxonomy', ...
0
votes
0answers
48 views

Order by Parent category, foreach terms as term

I am using Post 2 post plugin to link 2 post types. I have categories, parent and child. My single-invitations.php contain “For each terms as term” code. also am using Category Order and Taxonomy ...
0
votes
1answer
103 views

Sort custom post types by last name in the backend

I have a custom post type called speakers, where post title is a speakers first- AND last name. I created it with this code: add_action( 'init', 'create_post_type' ); function create_post_type() { ...
0
votes
0answers
33 views

Order Authors by custom field

we just relaunched our blog and one important thing was to set up a page which shows the authors, which worked. But now my chef wants me to sort them in a specific order: there are some authors who ...
1
vote
0answers
581 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 most efficient way (in terms of backward compatibility and code quality) ...
0
votes
0answers
20 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
29 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
108 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
34 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
66 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
86 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
115 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
50 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
55 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
49 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
67 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 ...