Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

wp-query

Merge 2 args in one WP_Query and order it by date

August 4, 2022August 3, 2022 by Magenaut

I’m trying to merge 2 WP_Query in a new WP_Query and then order all posts in this new merged query by date descending. I can merge 2 WP_Query and work fine, but I can’t order the new query

Categories Q&A, Wordpress Tags order, wp-query Leave a comment

Way to include posts both with & without certain meta_key in args for wp_query?

August 4, 2022August 3, 2022 by Magenaut

EDIT 2: Rather than figuring out the real solution I’ve decided to use a workaround, and am simply setting the default value for book_in_series to ‘0’. Thanks to @eddiemoya for all his the time he spent looking at this with me!

Categories Q&A, Wordpress Tags wp-query Leave a comment

How to know which one is the main query?

August 4, 2022August 3, 2022 by Magenaut

I just did an action on the query using pre_get_posts and it didn’t work. When I removed the $query->is_main_query() it did work.

Categories Q&A, Wordpress Tags query-posts, wp-query Leave a comment

get images attached to post

August 4, 2022August 3, 2022 by Magenaut

I want to have the ability to use pictures from the media library in a jquery slider on the home page so that it’s easy for someone else to update the pictures without having to hardcode it. I have attached a bunch of photos to a post and tried this

Categories Q&A, Wordpress Tags attachments, images, slideshow, wp-query Leave a comment

how to group custom post type posts by custom taxonomy terms

August 3, 2022August 2, 2022 by Magenaut

I would really appreciate if you could help me 🙂 I’m very stuck and don’t know how to proceed.

Categories Q&A, Wordpress Tags custom-post-types, custom-taxonomy, query-posts, wp-query Leave a comment

Combining two wordpress queries with pagination is not working

August 3, 2022August 2, 2022 by Magenaut

I am trying to combine two WordPress queries but it’s not working as well as pagination.

Categories Q&A, Wordpress Tags merging, pagination, wp-query Leave a comment

Sort posts by custom taxonomy name

August 3, 2022August 2, 2022 by Magenaut

Is it possible to sort posts (custom post type) by category / taxonomy (name, desc)?

Categories Q&A, Wordpress Tags loop, wp-query Leave a comment

How to extend WP_Query to include custom table in query?

August 3, 2022August 2, 2022 by Magenaut

I have been days over this issue now. Initially it was, how to store a user’s follower data in database, for which I got couple of nice recommendations here at WordPress Answers. After, following the recommendations I have added a new table like this:

Categories Q&A, Wordpress Tags wp-query Leave a comment

How to sort CPT by custom meta value (date), and return posts month by month

August 3, 2022August 2, 2022 by Magenaut

For future reference:
I am using the great Meta Box Plugin to help expedite meta box creation for my custom post types.

Categories Q&A, Wordpress Tags custom-field, custom-post-types, date, metabox, wp-query Leave a comment

Is it necessary to use wp_reset_query() in a WP_Query call?

August 3, 2022August 2, 2022 by Magenaut

I’m using the following code to retrieve posts:

Categories Q&A, Wordpress Tags wp-query Leave a comment
Older posts
Newer posts
← Previous Page1 … Page14 Page15 Page16 … Page25 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress