Posts published last 10 minutes
Posts published last 10 minutes
Posts published last 10 minutes
Query most popular terms by taxonomy over 2 week period
Does the WP_Query ‘private’ argument for post status only apply to privately published content?
Figured it out myself, for anyone else that needs help here are the two options.. <!–Method 1–> <?php $query = new WP_Query(); $query->query(‘post_type=page&p=’ . of_get_option(‘slide_page1’));while ($query->have_posts()) : $query->the_post(); ?> <?php the_title(); ?> <?php endwhile; wp_reset_query(); ?> <!–Method 2–> <?php $slide1 = of_get_option(‘slide_page1’);?> <?php $loop = new WP_Query( array(‘p’ => $slide1, ‘post_type’ => array(‘post’, ‘page’), )); … Read more
I ran your query and got … ORDER BY wp_postmeta.meta_value+0,RAND() DESC … which is what I expected. If I am reading your question correctly, what you want is … ORDER BY wp_postmeta.meta_value+0 DESC,RAND() … as in this question at SO. That should sort by meta_value first and then randomize any second level ordering that is … Read more
WP_Query Attachment adds additional attachment count and need to link attachment to post url
I don’t have the time right now to work the code, but you’ll need to use pre_get_posts and filter out based upon comment_status => ‘open’.
Just to close this one out – you can set Pages to be publicly_queryable using the function provided above.
How to filter a query by multiple meta keys and order by other meta keys
How to increase load time of an archive/search page (WP_Query)