Horizontally paginate through sets of blog posts?
Horizontally paginate through sets of blog posts?
Horizontally paginate through sets of blog posts?
How to load more custom type posts through AJAX & LOAD MORE POSTS button
How to show the posts list into a static page? Problems to use the loop into a static page
You can only sort on 1 meta value. A few posts (including this SE answer) suggest adding a filter to change the order. Add a function to your theme’s function.php file that will replace the sort order: function change_sort_order( $orderby ) { return str_replace(‘wp_posts.post_date’, ‘mt2.meta_value, mt1.meta_value’, $orderby); } Then use it where you want. Make … Read more
Display related posts with same category or same tag return blank
Don’t use query posts ever, my emphasis. It is just a bad function to use Note: This function isn’t meant to be used by plugins or themes. As explained later, there are better, more performant options to alter the main query. query_posts() is overly simplistic and problematic way to modify main query of a page … Read more
Filter WP_Query output before it is accessed (pre_get_posts)?
The problem is that you are passing a comma separated list of terms, not an array of term. For example, if you enter ‘army,navy,airforce’ in the custom field: $related = array ( get_post_meta($post->ID, ‘related_categories’, true) ); //$related = array(‘army,navy,airforce’); //What you need is //$related = array(‘army’,’navy,’airforce’); You need to transform each term into a array … Read more
I’m not sure why you are only getting 1 post returned. Your query args look correct, even if as I mentioned in the comment you should be using WP_Query. Therefore, if I had to guess, I would say your looped html markup is off? And is maybe not printing the results correctly. I’ve modified your … Read more
I believe that you’re asking about post format and not post type. Assuming that’s correct, you’ll probably be using WP_Query to query all posts of the post format “Standard.” However, as noted in this trac ticket, there’s strangely no way to query for the standard post format. Instead you need to query for all posts … Read more