Nevermind, I fixed it by changing query by author_name instead of ID
Works!
$the_query = new WP_Query(
array(
'posts_per_page' => -1,
'author_name' => get_the_author_meta('nickname'),
)
);
We can close this question!
Related Posts:
- Meta_query compare operator explanation
- WordPress get_posts function, 1300 lines long
- Exclude a category if post is only in that category using wp_Query
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- Use of caller_ get_ posts
- Tax_query terms ID’s using variable
- Custom query incorrectly returning everything [closed]
- Pagination custom query
- WP_Query and name__in
- Query certain amount of posts from multiple dates
- Order posts by tags count?
- Orderby = none not working [duplicate]
- Add inline HTML to posts published within last 24hrs
- Querying Multiple Custom Taxonomy Terms
- Unable to combine “search value” and “tax_query” using WP_Query
- How to extend tag and category “Related Posts” query to custom post_type if the first 2 terms have no posts
- WP_Query search for whole words
- WP_QUERY returns empty set when fired from a WP-CRON scheduled event
- Interupting the loop with extra divs to display data, and how to get it to work responsively
- Including only current user’s posts in search
- WP_Query, tax_query and term_meta: How to?
- How do I reset this wp_list_categories query?
- Refine search results using WP_Query
- query_posts: how to show all ‘meta_value’ containing a specific word?
- How to pass many ids in post__in?
- Query with a meta value inside a given range
- Pagination of a WP_Query Loop in a child-page page template
- Add condition of user capability in WP_query
- add_filter() depending on search term
- How do I run through a WordPress loop called from a filter function?
- How do I get the title of a category in a custom loop?
- Is it a good idea to improve meta query performance by adding tax query?
- WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
- How to display user order by role
- WP_Query | Tax_Query Relation | Unable to use ‘OR’ as it then allows all products, help me finish my query?
- hide custom post types with specific meta key ON admin backend
- Orderby listing issue
- Check if loop has any categories?
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- Current post in AJAX call is always zero
- Multiple filter conditions for WP_Query
- Get all fields inlcuding “ACF” (Advanced Custom Fields) columns in wp_query
- get_post_meta in WP_Query
- WP_query : Force last posts number over Reading Settings
- Order by most used tag
- WP_Query results stored in variables
- infinite loop in wp_query using simple query
- Modifing archive query affects show post count function
- For what queries is conditional tags informative?
- Utilising an existing page while using the “s” query parameter
- posts archive page – closing WP_Query loop correctly [closed]
- JSON – Create rest api endpoint for Advanced Custom Fields
- Query_vars support in Rest API
- Is it possible (and how to) query single Gutenberg blocks?
- Continue or break the while loop
- Get meta_value of a specific meta_key from all posts belonging to a specific custom type
- Nested array issue in meta_query
- Query by key or author
- Why doesn’t my WP Meta Query return any results?
- How to build the WP_Query using the code?
- How go give $value to wp_query
- Show multiple tax_query from 2 or more post_type in a single code
- Disable (or limit) queries when certain content (or data) is not needed (or showed)
- How to make the ‘request’ filter work?
- How to use rewind_comments() – when and how to use it?
- How to make a query returning pages from multiple parents
- create a custom query for posts managed by Restrict Content Pro
- How do I stop the same post showing multiple times in a archive?
- Related categories order posts by category
- Why pagination is not working with tax_query param?
- Finding post ID dynamically on click
- paginate_links method doesn’t show second page of my custom wp_query
- Wp_Query Post per page not working?
- Order Element By Custom Field in WordPress
- Display All Top Child Categories / Taxonomy
- how to get custom attachment url?
- ACF Post Object meta-query by title not ID
- Case insensitive ORDERBY in wpquery
- Sorting with meta_query and multiple, optional meta keys
- getting posts by tags
- WP_Query & Duplicate entries
- Query child posts with tax query on parents
- How to break up output of posts for different terms on same page?
- From admin edit user page query either the user_nicename or username field value of the user profile being edited or viewed
- Get posts by similar names and categories
- Calculating efficiently on large amount of data generated by wp_query
- Include post_status check within $wpdb query
- Return on a quest all these meta_value
- Complicated WP_Query
- Filter WP_Query output before it is accessed (pre_get_posts)?
- Divide WP_Query posts by date & post type
- Custom query to show posts
- New WordPress WP Query using posts from certain categories
- Taxonomy related query not working
- error with $query->have_posts()
- Multiple Orderby is not working right
- WP query based on two meta queries
- Using ‘meta_query’ with the ‘pre_get_posts()’ hook disables searching for post titles
- Woocommerce set loop_shop_columns to be 3 in the main shop page loop only and 4 otherwise
- How to save the results of a query as a php file for an autocomplete search bar