Browsing Category

Wordpress wp-query

$wp_query initiation?

I’m wondering when does WordPress initiate its main query which sets the $wp_query and enable us to use has_posts() and the_post() functions. If I create

Paginated Post List on Front Page

I am trying to get a list of posts on the front page of thereimers.co to have pagination. I am convinced that the code was

WP query retrieve the src of attached image

I’m encoding in JSON a bunch of data from a WP Query: $args = array( 'posts_per_page' => 20, 'post_type' => 'post', 'category' => 6, 'meta_key'

Prevent quotes being escaped when using search and replace query in the database

I used this query UPDATE wp0r_posts SET post_content = REPLACE ( post_content, ‘{loadposition tax-depreciation}’, ‘[gravityform id=”1″ title=”false” description=”false” ajax=”true”]’ ); to replace this: {loadposition tax-depreciation}

What happens when orderby meta_value have same value ? not getting any post

This is my $query_args $query_args = array( 'post_type' => 'post', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'orderby' => 'meta_value', 'meta_key' => 'insta_time', 'order' => $atts['order'],

How to properly reset a nested WP_Query query

I’m missing something here. What’s the proper way to reset a query so that it doesn’t interfere with any other queries it may be nested

Paginate nested query of child posts

I need help with paginating the child posts created by Toolset on the page of the parent post. Basically, I need to recreate the functionality

How to do meta_query for attachments?

How do I do proper meta_query for attachments? This doesn’t show any results $args = array( 'post_type' => 'attachment', 'post_mime_type' => 'image/jpeg,image/gif,image/jpg,image/png', 'posts_per_page' => 200,

I Want To Replace Wp Search To Product Search

I Want To Replace Wp Search To Product Search Please Help Me To Do It Read more here: I Want To Replace Wp Search To

Complex WP_Query (two post types and multiple operators)

I would like to display two different post types in the same query… nothing strange so far. But I would like to declare what taxonomies

Accessing and running query in another template file

I’m trying to access the current query ( Front page and Archive ) and use it in some other template file. I just used the

Call posts in one page from multiple sites

i want to show posts from my sub-directory in one page with wp_quary loop.so i try this code <?php require($_SERVER['DOCUMENT_ROOT'] . '/picture/wp-load.php'); $args = array(

Calling WP_Query with the same args in two different places produces two different results

Given the following code: $loop = new WP_Query( 'post_type' => 'project', 's' => 'Test', 'posts_per_page' => 10 ); var_dump($loop->request); I would expect the produced request

How to get proper search results with wp_query

I am using wp_query to get search results. But it only searches and returns matching title only. Does not return matching content and other ACF

Prevent author bio page from showing in search results

A client has a website with a user directory and they’d like the user’s author pages to be excluded from the site search so that

WP_Query gives me different results depending on the category order

I have a problem with category__in when I do a WP_Query. $query_args = array( 'post_type' => 'posts', 'nopaging' => true, ); $categories = array(1,8); //

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