Browsing Category

Wordpress wp-query

Replacing search results with custom external query

I’d like to replace the existing search function with an external query (from Solr) but I’m having trouble showing the results in the search.php page.

Paged wp_query under content page

I created a single page template. Under the content, I use WP_Query to display some related posts. Can this query be paged ? I can’t

WP_query : Force last posts number over Reading Settings

I need to display only the last 3 posts but i get 10 posts (Reading Settings). Any idea ? <?php $args = array( 'post_type' =>

Remove all DB queries except those required for permalink resolution / rewriting

I currently know there is a posts_request hook, but am looking for a “2017” way to disable all queries(including preloading ones) except those that target

WP_Query attachments by multiple IDs

I would like to get 2 images in media by their IDs. If I want to get only one image I would use this code

product sorting by custom attributes and custom query

I am try to sort product by custom attribute and custom query Currently I am using below code but it is not return desired result.

$wpdb->get_results() give error inside another get_results

i have code i use two $wpdb->get_results() first i run first query and then i use foreach but i want to run loop again $wpdb->get_results()

Paginate posts using meta values

I have meta values set to my posts that refer to year, month and day (all integers), I need the current post page to refer

Can I coun’t matches without doing a query?

I’m trying to count results for a given query, but I don’t actually need the posts so I’m trying to figure out if there’s a

$wp_query->query_vars no longer works in recent wordpress versions

The below used to work fine, but since one of the recent versions of wordpress (currently using the latest 4.7.4) the below no longer works

use multi value in s meta key query

i want use multi value in s meta key in wordpress query this is my query code <?php $portfolio = new WP_Query(array( 'post_status' =>'publish', 'post_type'

Create Wp_Query on save_post hook

I have a shortcode on my page that creates a listing of products using WP_Query. The query is complex so I thought to move all

Should wp_query automatic meta and term cache priming be used in an enviroment with an object caching

This is kind of followup question to Explanation of update_post_(meta/term)_cache which discusses the disabling of automatic meta and term caches by setting to false both

How to use wp_query in different column in single loop

This is my html structure. i want to display main page in left column which is column 6 and right and side 3 – 3

Show categories which start from a character

I want to shown get categories which have starting word (A or M etc). I search to much but can’t find a solution. Let me

WordPress pagination link always leads to home page

I am making a pagination for this website by using a custom query and get_next_posts_link, get_previous_posts_link. The problem is that the link to older entries

Back to Top 145132 wordpress questions, 32 Wordpress answers.
Wordpress related, All rights reserved
Powered by Creative Advertising