Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [order]

The tag has no usage guidance.

0
votes
0answers
5 views

Order selector when using woocommerce products shortcode [closed]

If I display products with shortcode like this: [products category="edesitok" pagination="true" limit="12" columns="3"] there is no sort order selector on the top of the list (for visitors) like "...
0
votes
0answers
12 views

Adding additional information to Admin Order Preview

Looking at adding the actual shipping costs of an order to the order preview pop-up. I think we have to use add_action with woocommerce_admin_order_preview_end and maybe even using add_filter to ...
1
vote
1answer
10 views

Show listings from Impress Listing plugin in random order using taxonomy and terms

I am not able to get the listings to show up. I have verified the slug for the post type and the taxonomy. This code I know works because I have used it for other post types and taxonomy's. Any ...
0
votes
0answers
8 views

Need a Plugin for Sorting Specific Category Posts within a Static Page

I am NOT a strong PHP coder and mainly create sites using plugins and custom CSS which I am strong at. I have a page listing posts from a specific category. The page is built using Elementor Page ...
0
votes
0answers
29 views

Woocommerce 'order_by' random with 1 hour seed refresh

I need my woocommerce products to display randomly. My products are actually people and the random element is so different people get seen on the first page so no-one is favoured. So, I have ...
0
votes
0answers
20 views

Featured posts reordering without plugin - Newspaper theme

I am using Newspaper (child) theme where the 2 carousels display the 11 featured posts (first 5 in the main carousel and the following 6 in a secondary carousel). We used to use a plugin to reorder ...
0
votes
0answers
17 views

In get_terms, orderby meta value not working with child_of

Here are my terms query and args. $termArgs = array( 'taxonomy' => 'category', 'hide_empty' => true, 'orderby' => 'meta_key_num', 'meta_key' => 'belCount', '...
0
votes
1answer
22 views

Wp Query sort order from custom MetaBox

I am trying to sort a list of post based of the meta_key deal amount, which would be to display the highest deal first and work its way down to smaller deal amounts. The deal amount would be anywhere ...
-1
votes
0answers
11 views

Orderby count and post_status any dosent work toghether

I have a field that shows all the taxonomies by order of posts. i have a 30 last days/all time field, and when a post exceeds the 30 days limit it goes into draft, so when it is changed into all time ...
0
votes
0answers
21 views

how to get order item discount price woocommerce

I am using woocommerce to display my woocommerce order items in a custom page. I have the following values: order single item price which is $item->get_total() / $item->get_quantity() order ...
0
votes
1answer
12 views

Order management including recurring orders on woocommerce

I've been trying to find a good way for handling order management as I have some recurring payments on my business. I need to set up a system that informs me how many items I should have in stock ...
-1
votes
0answers
29 views

How can I add a transaction type custom field to WooCommerce order?

I am developing a custom payment method for WooCommerce. My code is as follows: class WC_Gateway_Custom extends WC_Payment_Gateway { public $domain; /** * Constructor for the gateway. ...
0
votes
0answers
15 views

Sorting with meta_query and multiple, optional meta keys

I'm trying to sort a custom post type by 3 properties: Meta Key: is_featured Meta Key: is_primary Title The two keys are boolean ACF items, and are both optional, so most of the posts don't have the ...
0
votes
0answers
14 views

WooCommerce Order Action In New Page

I have added an action button to the orders page and I want it to open in a new window. This is my code: if ( $order->has_status( array( 'processing' ) ) ) { // Get Order ID (...
0
votes
2answers
29 views

Orderby Title not working

When I'm trying to sort my blog posts or my woocommerce in alphabetical order nothing changes. If I access the /?orderby=title-asc or ?orderby=title-desc it brings me the same results. Any sugestions?...
0
votes
0answers
48 views

Woocommerce: sort by price and sku - combination of meta values

I'm trying to sort products by price, but have them sorted by sku and not by id for a specific price. So if there are 10 products with the same price, they should be ordered by sku instead of id. I ...
0
votes
0answers
26 views

Woocommerce merging cart and checkout page together

I've go an idea to merge cart and checkout pages into one. Doing it by moving files produced errors but i found a simple, yet effective solution. In order to make cart and checkout page as one, all ...
0
votes
0answers
20 views

Order by date with more than one meta key in Wordpress query

I have a list of events and they all have either a 'start date' or 'date'. I am trying to list the events in order using either field depending on which is filled out but am having no luck. I tried: $...
0
votes
0answers
35 views

Why does this incorrect pre_get_posts meta_query work for sort order?

I've got a fairly complicated post type archive page that I need to order by two meta fields and the post title. To do that, I'm using pre_get_posts with a meta_query that simply tests for the ...
0
votes
0answers
66 views

WP Query. Ordering posts by another post types meta

I have a custom post type called BID which contains a users bid (similar to freelancer.com, upwork, etc) However I need the BID results on the page to be ordered by meta stored in a users profile, ...
2
votes
2answers
39 views

Ordering terms before displaying posts

My question is close to other questions, but I dont' have enough reputation to comment. I'm working for a restaurant and I 'd like, for my menu page, to organise my posts "meal" under terms "...
0
votes
0answers
7 views

specific post always at 3rd position in a category page

I have already searched but found nothing useful. im Develop a Wordpresstheme. I would like to have a post always located at 3rd position in a category page. Another at the 6th place. At first I ...
0
votes
0answers
9 views

Selling some product individually

I am working on a woocommerce website. The website will sell some high-value products like motorcycles, cellphones on EMI. We want some products like these to be the only product in the order. How can ...
0
votes
1answer
23 views

Stylesheet Enqueue Order and Best Practices

i would like to do the following: customize a theme to my likings for use on several sites and installations. so i can make "global" changes (via own plugin?) then i would like to have a site ...
1
vote
0answers
24 views

get_adjacent_post() returning weird results

I am using get_adjacent_post() function to display links to a previous and next post. It is a custom post which also has a custom taxonomy. This is the code I am using: $prev = get_adjacent_post(...
0
votes
1answer
41 views

Sort loop by title doesn't sort single digits like human would

Post titles have numbers from 1 to 50 and i want to sort them in order, it's not possible to use 2 digits, the sequence goes like: 1,2,3,4,5...50. So i use: $query->set('orderby', array( 'title' =...
1
vote
0answers
72 views

WooCommerce order complete email logic

Can someone helps me to understand the logic of WooCommerce for sending email on a completed order? If I'm not wrong, the mail is send when the order is marked complete, but I'm not able to find the ...
0
votes
0answers
15 views

Sorting meta_query of custom post type

I have 2 custom post types Transit and Colors, connected with a relationship - as a transit post has a custom field to select a color post that it will belong, that stores the Color post ID. I ...
1
vote
2answers
113 views

Display posts from #6 to #20 on archive page

My client shows his 5 most recent posts (excerpts) on the homepage followed by a "read more" link. On archive page he does not want to display the 5 most recent post again but posts from #6 to #20. ...
0
votes
0answers
44 views

What is the ‘real’ way to show purchase notes on the order details page?

Can someone please outline the proper, working, way of displaying purchase notes? For a long time, I have been getting them to display correctly on my order details page (thankyou.php) however the ...
0
votes
0answers
11 views

Custom ordering a list of multiple post types

I'd like to create a (masonry grid style) list of multiple "custom post types". Just like a Pinterest. This can easily done with "Query Wrangler". Is there a way to create a custom ordering for this ...
0
votes
0answers
9 views

Order by 3 custom fields in archive Woocomerce list

I'm trying to order the products in woocomerce archives pages by 3 custom fieds, my code is: add_action( 'woocommerce_product_query', 'imcar_custom_product_query' ); function ...
2
votes
1answer
139 views

Display custom post types with custom date field value (before today) & order by custom date field

I'm trying to display custom post types with custom date field value being before today. It works OK for showing posts before today, but the order is only based on post date. I want to have the result ...
0
votes
1answer
112 views

Add button linked to single product page on order detail page

I have write a code on functions.php so when customers click a button on order detail page, redirected to product page and review tab of the product they bought. But as a novice coder, I can't get the ...
0
votes
2answers
56 views

(Solved) WP_Query ($ args) -> How to sort letters and numbers within the same array

I'm developing a system where I have a Deck presentation. I have a field that takes the post by the 'copas' type of card being within the 'meta_value' array specification, and I would like it to be ...
0
votes
0answers
24 views

Woocommerce canno't print product page

I try to print the product details page from a Woocommerce instance. But when I press CTL+P I get a Blank page. How can I fix this issuse?
0
votes
0answers
25 views

Add another email to a customer to recieve procesed order woocommerce

I need your help to create a field that I put another email from a customer. I need that customer to receive the order and with the other email receive the same order. I tried this code: ...
0
votes
1answer
46 views

I Changed the Menu Order, But the Page Order Didn't Change on Front Page

First-timer here! I'm trying to change the order of pages on my boardgame webpage, as displayed on the top banner www.mangakagame.com . Basically, I've used "Edit" in the Dashboard and adjusted all ...
0
votes
0answers
43 views

stop looping of woocommerce admin order actions

this is my code below to add my own action into the admin order page.But what happen, it is repeated several time.Thanks in advance for any help. public function ...
0
votes
1answer
105 views

how can i add an additional action into woocommerce admin order page through my plugin?

Currently I am building a plugin which I need to add an action button in order to print a pdf with admin order.
2
votes
2answers
28 views

can't get query to order posts by acf datepicker

I've read alot, I've tried a bunch of different things, I still can't get my query to order posts by acf's datepicker field. This is what my code looks like: $args = array( 'post_type' => '...
1
vote
1answer
509 views

how to fix error “called incorrectly, should not be accessed directly”?

Recently my woocommerce has been throwing errors all of a sudden. no changes were made to the website or server. When customers try to run a transaction, they get the following error "Transaction ...
0
votes
2answers
160 views

how to get post order by post id wp_query?

i have 4 post and i displaying 2 post per page. $ids = array('16085','16088','16083','16091'); $options = array( 'post_type' => $post_type, 'posts_per_page' => $posts_per_page, ...
0
votes
1answer
164 views

Multiple sorting criteries (order by)

I want my products to be sorted by price (ascending) and products, which are out of stock be placed at the end of the products list. How can I achive this in WooCommerce? Is it ever possible to ...
0
votes
0answers
224 views

Customize `order-received` page woocommerce

I want to update the product price of each product ( variation currently) based on custom meta fields(created using woocommerce_add_cart_item_data ). add_filter('woocommerce_add_cart_item_data', '...
0
votes
0answers
9 views

How to modify order created webhook order data

When a customer uses a gift card to purchase an item, the payment method in the order_created webhook post data is blank (when purchased with stripe it says stripe). I need to modify that to say Gift ...
0
votes
0answers
21 views

Order get_the_tag_list (order as in the back-end)

In category I use get_the_tag_list as filter with the following script: <ul class="work_filter mb_50"> <?php $cat = get_category( get_query_var( 'cat' ) ); ...
0
votes
0answers
46 views

Woocommerce - Order products by 2 custom fields

I order the product list by one custom field with this code: add_action( 'woocommerce_product_query', 'imcar_custom_product_query' ); function imcar_custom_product_query( $query ) { if( ! $query-...
1
vote
1answer
106 views

How can I pick a single post from the latest 3?

I'm looking to display a single featured post from my latest 3 posts at random. I've managed to get it up and running picking any post at random just fine, but I want to filter it down to only the ...
0
votes
0answers
23 views

Order posts by the date that a taxonomy term was assigned

Is it possible to order posts by the date that a certain taxonomy term has been assigned to them? If so, how would I go about doing that?