The order tag has no wiki summary.
0
votes
1answer
24 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
22 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:
...
0
votes
1answer
22 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
12 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
votes
0answers
16 views
How to add second email into billing page in WooCommerce?
I'm new to WooCommerce and PHP, so I've faced problem. Now by default after user has checkout he recives a latter with a list of things he ordered. Now I need to give a customer abuility to send that ...
1
vote
1answer
24 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
43 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
232 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
60 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
38 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
0answers
35 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 ...
1
vote
2answers
50 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
23 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
1answer
45 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 ...
0
votes
1answer
73 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 ...
3
votes
2answers
112 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) {
...
0
votes
0answers
67 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
1answer
36 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 ...
0
votes
0answers
24 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
39 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 ...
-1
votes
1answer
77 views
I want to Add My Product Image to Admin Order Email in Woocommerece
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
0answers
15 views
child pages are not ordering correctly? [duplicate]
I have a custom post type.
I want to display them in the menu order.
e.g In backend i have something like
Post 1
Post 2
Post 3
child 1
child 2
post 4
Post 5
...
0
votes
1answer
35 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
49 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 ...
1
vote
2answers
38 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
83 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
41 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
44 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
79 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
70 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
41 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
20 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
160 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
1answer
34 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
0answers
38 views
All in one event order by
Im using All in one event calendar. On my single event page I want to query some dates and sort them by start date. My query looks like this:
<?php $event = ...
0
votes
1answer
17 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
1
vote
1answer
51 views
Make Images appear in the same order as in media browser using get children?
I would really like my images to display in the same way I've ordered them in the media browser. What am I doing wrong?
$images =& get_children( array('post_parent' => $post->ID,
...
0
votes
1answer
105 views
WP_Query orderby not working with meta_value_num and menu_order
I have made a custom post type (sidebar_element) which are shown on sidebar. On each sidebar element admin can choose where in sidebar should that element be shown, ie. 'top', 'middle' or 'bottom', ...
0
votes
1answer
192 views
Ordering of gallery images without using shortcode in theme
I using the built-in gallery in wordpress to store and sort images inside a custom post type. In the theme I was using:
$attachments = get_posts(
array('post_type' => ...
0
votes
1answer
119 views
reorder a WP_Query, using a dropdown
I have the following loop used to display posts by category & I would like to to re-order them based on a dropdown selector
if (!isset($qry))
$qry = new ...
0
votes
1answer
63 views
Custom order categories in admin dashboard
everyone, is there way to order categories in add/edit post in admin dashboard. The problem is my order must be custom, not by Name or ID. For example:
Rumors (id 5)
News (id 1)
Features (id 7)
etc.
...
0
votes
1answer
66 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
72 views
Sort query output on taxonomy term archive by post type using pre_get_posts
I'm using pre_get_posts to adjust the main query of the taxonomy term archive.
What I would like to accomplish is that the output is listed by post_type. I have a total of 4 post types and I want to ...
0
votes
1answer
49 views
List most recently added posts (with a twist)
At first I thought the task was trivial. I'd like to list the most recently added posts (say, 15 of them), but I am adding posts that are dated a few years back, yet I'd like them to show in the ...
0
votes
1answer
70 views
Allow user to set custom order to a list of custom taxonomies?
I have a custom category checkbox on each individual bio attorney page that shows what practice areas these attorneys are involved in. Currently I have them sorting alphabetically. I am wondering if ...
-1
votes
1answer
84 views
Get current menu_order
WordPress implements a simple order functionality by default.
What's the common method, to retrieve the menu_order for the current post or page?
1
vote
0answers
86 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
1answer
130 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()
{
...
0
votes
1answer
53 views
How can I sort posts by the date and a custom meta field?
I have custom meta field that I use for the post rating.
So I want to display posts by the date and the rating, but only for the posts that have specific rating.
For example, I want to display posts ...
0
votes
1answer
69 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' => ...
