Tagged Questions
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 ...
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
328 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
83 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
196 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
141 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
271 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
445 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
111 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
409 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
419 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
526 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 ...