The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
12 views

Sort WP_Query by one meta key and post_date [duplicate]

I want to order by post to check for the existence of a meta key ('featured') and include those posts first and as a secondary option I want to sort by post_date, similar to 'sticky' posts on a ...
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
8 views

Woocommerce productsorting will not update page [on hold]

I`m working on woocommerce and have been trying the whole day to fix the problem. Now its up to you ill cant find it out. If i change the option in the form it should automatically change the ...
0
votes
2answers
21 views

WordPress Screwing Up 'orderby' => 'meta_value_num' in 'pre_get_posts'

I have a bunch of _ai_price_int meta values set up as just numbers. This is how the table looks: meta_id, post_id, meta_key, meta_value 1309, 1111, _ai_price_int, 6550 1310, 1115, ...
-2
votes
1answer
25 views

Orderby with menu_order and title

Since Wordpress native order system is a little dumb (ie: 1 banana, 10 bananas, 2 bananas,...) I needed to add a plugin that let me set the order for numerical titles. The thing is that when I set ...
1
vote
1answer
34 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
2answers
42 views

How do I make a custom taxonomy for a CPT appear inbetween title and editor boxes?

This may be a duplicate of this question - Changing the priority of a custom taxonomy's metabox but I can't work out how to apply that answer. I'm unsure what my custom taxonomy div label would be ...
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
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 ...
1
vote
0answers
24 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 ...
0
votes
1answer
28 views

Order terms by count - missing terms

I have this problem: I'm using get_terms with ordering by count. And some terms are missing - I have no idea why, there is no exlude, or hide posts or anything like this. What is wrong? Here is the ...
0
votes
1answer
25 views

show previous/next post orderer by title in custom post types

What's a working method to show link to next and previous same custom post type article, ordered by title and not id? (generally applying a filter to the order)
0
votes
2answers
41 views

Are plugins instantiated on every request to Wordpress?

I want to know how wordpress plugins are instantiated, if Wordpress creates a instance of plugins every time that a request is made to wordpress? Example. I open /wp-admin: The plugin is instantiated ...
4
votes
2answers
98 views

Order by optional meta key?

I'm building the sorting functionality for a custom post type, and I have a custom meta value for "Featured" posts. This value is set when you tick the checkbox, otherwise it is not set. Using the ...
0
votes
1answer
56 views

How to add a date creation field when a custom taxonomy relationship is created?

I need to display a list of posts and order it by date. The date of when the taxonomy term relationship was created. Is this possible? If so, how can I approach it? Thank you. EDIT - SOLVED! ...
-1
votes
1answer
45 views

Sorting Attributes order when using get_the_terms

This code has worked to display product attributes on a page. How do I sort/order them by slug? They are currently sorted by name. global $post; $terms = get_the_terms( $post->ID, 'pa_size'); ...
0
votes
1answer
41 views

change order of add_action hooks for jquery to be loaded first

a slider plugin puts its javascript “right before the closing body-tag” using an add_action() hook like this: protected static function addAction($action,$eventFunction){ add_action( $action, ...
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
1answer
25 views

Get post closest to today

as the title indicates I am trying to make a query for the post closest to today's date. I know this is a duplicate post but the ones I have found on the topic has not been able to solve my problem. ...
2
votes
1answer
59 views

Custom Post order for homepage

I would like to display a dropdown on the homepage which contains [most popular, most recent, trending] and when a user selects on of them the posts are page reloads and the posts are sorted in that ...
2
votes
1answer
80 views

Order Posts by Taxonomy and Meta Value

It's possible to order posts by Meta Value. It's possible to order posts by more than one value. And thanks to the code below it's possible to order by taxonomy. But how can I alter the code below ...
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 ...
0
votes
1answer
18 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
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
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 ...
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 ...
0
votes
2answers
40 views

Order by multiple meta keys on wordpress

After multiple research I didn't find the correct answer to my question. I just need to order my custom post type by date and then by time (format: 18:00). Here's what I tried: ...
0
votes
1answer
55 views

Merge 2 args in one WP_Query and order it by date

I'm trying to merge 2 WP_Query in a new WP_Query and then order all posts in this new merged query by date descending. I can merge 2 WP_Query and work fine, but I can't order the new query $args1 ...
0
votes
1answer
27 views

How can I use 'orderby' => 'meta_value_num' to order by the numerical value even if the value starts with a word?

I'm using 'orderby' => 'meta_value_num' to order some boats I have as a custom post type, the meta values ordered by, are boat models, which are normally just numbers but if you look at this page: ...
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
48 views

Tax query array terms display out of order

I want my tax_query terms to display posts in the order I have them listed in the array below but it is not following the order listed. $args = array( 'post_type' => 'staff', ...
0
votes
2answers
51 views

Order posts with custom taxonomy array

I am trying to make my loop go through the posts that are associated with these terms. Currently nothing is being output. <?php $args = array( 'post_type' => 'staff', ...
0
votes
2answers
51 views

Ordering Posts with Custom Taxonomy Terms Array

I can't get the order of my posts (organized by custom tax terms) to come out right in my loop. I made a custom post type of 'staff', in staff there is a custom taxonomy of 'staff-title'. I added ...
0
votes
2answers
21 views

Archive not sorting correctly

I have a custom post type called "cif-events" and I want to sort by the value in wpcf-start-time. I added the following to my functions.php: add_filter('pre_get_posts', 'set_order_for_archives'); ...
0
votes
1answer
57 views

Compare 3 custom fields and sort by oldest

I am building a movie archive. For each movie I am filling out the release dates for 3 countries, they're stored as custom fields (added via Pods) Now, when listing the movies I would like to build ...
0
votes
1answer
52 views

Order Custom post type loop by custom field (datepicker)

I know there are a lot of articles and documentation on this but I can't seem to figure it out. I have a custom post type 'agenda' wich is made for events. I want to sort this by the eventdate. For ...
0
votes
2answers
62 views

Order get_users() by last login date. Is it possible?

I want to create a page that displays all the blog users ordered by the last login date. I've tried with the get_users() function and I can succesfully get the users' list, but not in the order I ...
0
votes
1answer
28 views

Adding Page Ordering to a Custom Page Type

I've created a custom page type (that is, a custom post type converted to a page). This template is used to display profiles of employees. I then use the Simple Page Ordering plugin to order my pages ...
0
votes
1answer
26 views

Display all pages - in order

My goal a single-page vertically-scrolling site. I'm using this code to display all the pages one after the other: <!-- All Pages --> <?php $pages = ...
0
votes
2answers
43 views

WP Query - Is this correct?

Trying to debug, getting headache so I want to ensure that I have placed the query args in the correct place. I want to sort/order all my posts based on "myvalue". <?php if ( ...
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 ...
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
88 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
1answer
200 views

orderby:date not working

I have been searching for an answer and it seems like there are a lot of answers for the opposite issue. I am trying to sort by publish date, not by date modified, using this code: ...
0
votes
1answer
53 views

Sort appearence order in the_content()

I have an About the Author plugin, echoing inside the_content(), and a Facebook Like Button, that I hardcoded in the HTML, after the_content(), here's how it is outputting: The Facebook Like button ...
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 ...
0
votes
1answer
113 views

4 column-loop ordered alphabetically with entries grouped (and labeled) by their first letter

I found some code for creating multi-column WordPress loops and I found some code for entries grouped by letter of the alphabet. But I can't quite get the code to work together...the order is a bit ...