0
votes
1answer
66 views

How to manage a particular “order by” for get_search_query()?

How to manage in the search.php file the order of a posts search query managed with the following code <?php echo sprintf(__('%s Zoekresultaten voor ', 'website'), $wp_query->found_posts); echo ...
1
vote
1answer
115 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 ...
0
votes
1answer
38 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 ...
2
votes
1answer
68 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 ...
1
vote
0answers
23 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
47 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
182 views

Order by title - but now built in wordpress func, sort the_title

I've got a pretty simple WP installation, where I use qtranslate plugin to keep site in two languages. The problem is, I need to sort posts by title, and as probably you know (as you use qtranslate), ...
0
votes
0answers
100 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
2answers
329 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
1answer
687 views

Displaying Portfolio Filter by Category Order (alphabetically)

I have created a custom post type to display churches in Europe. I used this tutorial to make it filterable: http://wp.tutsplus.com/tutorials/creating-a-filterable-portfolio-with-wordpress-and-jquery/ ...
0
votes
1answer
970 views

WP_Query ordered by custom field that is a date string?

Each of my posts have a single custom field that is a string of a date (not the date of the post). Instead of my theme's current query, which orders by published date, I want to order by this custom ...
1
vote
2answers
446 views

Order query by post meta value

//Displaying latest post per author on front page function filter_where($where = '') { global $wpdb; $where .= " AND vipwp_posts.id = (select id from {$wpdb->prefix}posts p2 where ...
0
votes
1answer
194 views

Adjust the order for returned posts

I have written a neat responsive slider for my Wordpress featured articles (feel free to use it): <?php $responsive = 'on' != get_option('henrik_responsive_layout') ? false : true; ...
0
votes
1answer
358 views

WP_Query orderby meta key/value suddely stopped working

I have code that has been working for a long time which when a user clicks a button to order database results by name/value, it gets the results via AJAX from a page that does all the querying. I ...
0
votes
1answer
726 views

mySQL query. ORDER BY meta_key

I'm fighting this quite long already and start to think I'm missing something big. CPT posts could have or not metadata ( _vip_post [0|1], _thumbnail_id [null|numeric] ). If i query for ...
0
votes
1answer
120 views

Allow admin to determine the order of queries?

I have a custom query that I created to display the team members of a company, but my client has asked whether they can have control over the order in which each team member is displayed. Is this ...
0
votes
1answer
709 views

Changing WordPress sort order for returned child pages

I have a custom WP_Query that looks like this: $this_page_id=$wp_query->post->ID; $images = new WP_Query( array( 'post_type' => 'menu-item', 'post_parent' => $this_page_id ) ); My ...
0
votes
1answer
650 views

Posts 2 Posts: query connected — orderby problem

Using Posts 2 Posts plugin I've created 'piece', 'person' and 'collection' custom post types: any piece may be connected to person (with roles 'author', 'conductor' etc) and collection. Now the ...
0
votes
1answer
736 views

How to query posts by month based on date custom field?

I currently created a custom field for a custom post type that stores a date in the format dd/mm/yyyy is there a way to query the posts by the month? I "kind of" got the functionality I need using ...