The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
36 views

Custom Post Type order by modified date and custom meta field issue

I'm creating a plugin with some kind of offers that users can publish. User, in his custom administration panel, can managed his own offers. Offers are free and premium. If offer is premium it take ...
1
vote
1answer
126 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> ...
1
vote
1answer
107 views

Custom order for Mysql array

I have a Page of Posts, each post has a Custom Field "expired" which contains a date in the format YYYY-MM-DD which is used to order the posts. This date is used for a script that tells the visitor if ...
1
vote
1answer
80 views

Sorting a query Field by date

I have my site, which at the moment is display university open-days, at the moment they are sorting by order of page title, when actually I would prefer they sorted in order of date, soonest first, ...
0
votes
1answer
8 views

Enable the admin to sort custom taxonomy

I added a custom taxonomy (separate categories for a custom post type) like this: register_taxonomy(self::$slug . '_category', array(self::$slug), array( 'label' => 'Kategorien', 'labels' ...
0
votes
1answer
19 views

Ordering custom post type by custom field without a title

My custom posts don't have a title, rather they rely on custom fields, and all the solutions I've tried so far seem to work if the title is present. <?php $paged = (get_query_var('paged')) ? ...
0
votes
1answer
50 views

Rearrange elements outputted by comment_form()

I'm currently developing a custom theme from scratch. In the past week, I've been trying to change the order of the HTML elements output by the comment_form(). I basically don't know any PHP, and I ...
0
votes
1answer
51 views

Randomly select one of last 3 posts

ok so i have this: $args=array( 'orderby' => 'rand', 'order' => 'DESC', 'posts_per_page' => 1, 'offset' => $offset, ); $q = new ...
0
votes
1answer
111 views

Order by ASC, DESC, Title, Date from URL on custom page template post

I have a Page with Custom template. In this template I have index all posts of a category with many more modification. I know i can do this by creating Category specific template but this is different ...
0
votes
1answer
78 views

Display custom post types by date field

I have a custom post type that is simply titles with a date field. I want to display these posts in a list in order of this date field (not date posted). So simply: -- Sample date Event title 1 ...
0
votes
1answer
103 views

Posts2Posts, wp_query and orderby issue

I've been working on this issue for several hours now and I'm stumped. The following query refuses to accept any orderby directive. NOTE: This is running on a single-cpt.php page within the normal WP ...
0
votes
1answer
55 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...) ...
2
votes
0answers
228 views

Trying to perform complex custom field query with order by set to field value

I've got two custom fields for event posts: event-start and event-end. When I'm querying for current events, I'd like to show any post where the event-start OR the event-end is greater than or equal ...
2
votes
0answers
165 views

How to sort posts by last name (2nd word) on ONE category only?

I have an "author" category that is used as a list to browse multiple posts containing author biographies. I have Smart Category Ordering installed and right now it is sorted by title ascending. ...
1
vote
0answers
20 views

Order posts by category name

Is there any way to order posts by category name? I tried $args = array( 'post_type' => 'dlm_download', 'posts_per_page' => 10, 'paged' => $paged, 'order_by'=> 'cat', ...
1
vote
0answers
26 views

Trying to sort and display categories(not posts) by custom field: 'order'

I'm a WordPress rookie. I've added a custom field to my "Category" taxonomy. The custom field is "custom_order" and its purpose is to hold a number so that my categories can be sorted and displayed in ...
1
vote
0answers
22 views

Order posts with a custom field but also without

I am querying and ordering posts with this code but my theme adds the custom field (cb_vote_nb_vote) only if someone clicks the "vote" button, since I am doing a listing, posts created without that ...
1
vote
0answers
51 views

Custom taxonomy/category order

My products are sort by menu_order, but I would like to sort category name too. I tried a few plugins and all doesn't works. Code, which display category name and products list: <?php ...
1
vote
0answers
10 views

query pages by a childs publish date

I am currently working on a wordpress project and would like to know if its possible to query pages by a childs publish date? I currently only want to show the parent page so my arguments look like ...
1
vote
0answers
41 views

wordpress query - orderby child post date

I have support ticket system which i have built using wordpress. The basic functionality is that when a "ticket" is created, it creates a post. When an admin replies, it then add a child post to the ...
1
vote
0answers
130 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
0answers
272 views

How to filter a query by multiple meta keys and order by other meta keys

I'm trying to query posts using WP_Query and meta_query parameters: $args = array( 'post_type' => 'produkty', 'meta_query' => array( 'relation' => 'AND', array( ...
1
vote
0answers
315 views

Meta query with multiple custom fields for archives page ordering problem

I'm modifying the query for archives pages so that the posts showing up on year, month or day pages are queried by there custom field (start-date and end-date) and are sorted by custom star-date ...
1
vote
0answers
220 views

define orderby URL with meta_key=post_views_count

I want to make an url with meta_key=post_views_count. E.g: http://www.mysampleweb.com/?meta_key=post_views_count&orderby=meta_value&order=DESC So the posts should be ordered by Views. ...
1
vote
0answers
121 views

Manage Columns : order by post_parent's title

I have 2 custom post types : "industry" (page + hierarchical) and "product" (post + hierarchical). This allows me to use Industry for Product's post_parent. On the Product manage screen, I have a ...
1
vote
0answers
343 views

How to order posts by meta_value and title

How do you order products in WooCommerce so that products are random, but at the same time featured products show first? Here is my code: $args = array( 'post_type' => 'product', ...
1
vote
0answers
338 views

bbPress plugin: forum lists not showing in correct order?

I'm running Wordpress 3.3.1 and bbPress 2.1 (plugin, not standalone) my forums are are not being listed in the front page archive or forum summary pages in the correct order; I double checked many ...
0
votes
0answers
10 views

WP_Query 'orderby' => 'title-of-parent title'

How can I order a query by parent page attribute first and then by child page attribute? By title or by menu_order is acceptable. For example, if my query matches child pages, and my search results ...
0
votes
0answers
18 views

query_posts with sorting on a custom datestamp

I have a custom meta field that I want to use to sort with query_posts but its not ordering my posts properly since it is a datestamp (i.e. 04/21/2014) and its treating it like a normal text string. ...
0
votes
0answers
39 views

Ordering custom post type by multiple custom fields

I was wondering if you'd be able to help with an issue i'm having? I have implemented a fix that you came up with in this post: How to order custom post type by multiple custom fields? however when I ...
0
votes
0answers
10 views

Global localized sort order

WP tables were created on import from another server, and most columns got the utf8_general_ci collation. The problem I'm having is that menus are sorted in the wrong order for the language of the ...
0
votes
0answers
37 views

next_post_link and previous_post_link order not working properly

Very strange problem, i have uploaded lots of photos and made posts for each of them so i have them in order 1 to 120. I have used next_post_link and previous_post_link in my loop eg. <?php if ( ...
0
votes
0answers
19 views

Order a query by meta_value and then by post_date

I'm using the following query (mytheme/function.php) to sort posts by Custom Field(=admin_rate) function sort_searchresult_by_admin_rate($k) { if (!is_home()) { $k->query_vars['meta_key'] = ...
0
votes
0answers
40 views

Title after content dynamic_sidebar

Is there a configuration to change the dynamic_sidebar widget's title order? I want to display title after the content. I used JavaScript to swap it at page load and looking for a robust -- tangible ...
0
votes
0answers
53 views

orderby in WP_query doesn't works

I thought that this already works but now I tested it and it seems that it no longer works. I have this code: wp_reset_query(); $args=array( 'posts_per_page' => 3, 'meta_key' => ...
0
votes
0answers
89 views

Admin - post order by category and sub category

I am trying to get the list of posts ordered in the admin area when sorted by their parent category. Ideally it would sort like this: parent category 1 -child category 1 --post 1 --post 2 ...
0
votes
0answers
54 views

How to order query by meta value added date

I have a movie trailers website. There are usually two or three trailers on the same page for a movie. I add trailer urls using multiple custom fields. When there is a second or third trailer I simply ...
0
votes
0answers
70 views

Wordpress sort custom field values in alphabetical order

I am using WordPress Custom Content Type Manager to build a Literary Agency website. The page I'm stuck on is the Authors page which displays thumbnails of all the books related to the author. The ...
0
votes
0answers
312 views

WooCommerce After Payment Hook

I have made a custom post type called press_release, and connected it to the custom post type of woocommerce shop_order using a custom field, where the order_id is the same as the custom field value. ...
0
votes
0answers
115 views

WooCommerce New Order Check if Paid

I am creating a press release system, where I want to check if the new order has been paid or not, and accordingly I will set the post meta. I am using the following code, but it's not working, maybe ...
0
votes
0answers
46 views

Custom Post Type Order Issue

I am having an issue getting my Custom Post Type "slide" to pick up the custom order set in the order attribute. In fact I can't seem to get the order to change from ASC to DESC period. I have ...
0
votes
0answers
76 views

Orderby comment_count ignored if multiple orderby values

I'm trying to order my archive page by comment_count then title. add_action( 'pre_get_posts', 'my_change_sort_order'); function my_change_sort_order($query) { if (is_archive()) { ...
0
votes
0answers
163 views

How to order custom posts type by number of facebook likes

I have a custom post type called "quotes" and I want to order these posts by facebook likes in the category page. How can I do this? Thanks.
0
votes
0answers
269 views

wp_query orderby random do not repeat infinite scroll - one loop

I have found a lot of documentation on solving this issue with multiple loops, I'm finding it hard to see a solution for one custom loop. Problem: I'm using infinite scroll to load in the next page ...
0
votes
0answers
160 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
45 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
0answers
83 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 ...
0
votes
0answers
148 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
0answers
132 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
0answers
949 views

Order by custom field meta_key date and then by custom file meta_key number

I'm trying do order a custom post type page by 2 variables: - first is the custom post type meta_key "date" - then, for posts with the same date, it should be ordered by meta_key "number" I'm willing ...