Skip to content

Magenaut

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

order

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

Order get_terms using a Custom Field

August 3, 2022August 2, 2022 by Magenaut

I have a custom taxonomy of “crb_issues” that has a custom field associated with it that is “issue_date” which outputs a date value for each term to looks a lot like “20140601” yearmonthday.

Categories Q&A, Wordpress Tags advanced-custom-fields, custom-taxonomy, order, terms Leave a comment

Adding ‘menu order’ column to custom post type admin screen

August 3, 2022August 2, 2022 by Magenaut

I want to use the menu order attribute to control ordering for a custom post type that’s going to be used for a specific purpose.

Categories Q&A, Wordpress Tags columns, custom-post-types, order Leave a comment

Increment Page Order As Pages Are Created

August 3, 2022August 2, 2022 by Magenaut

In the Admin Panel, is there a way to hook into the page creation and increment Page Order number of each page or to be equal to the number of pages. Right now the default is 0 and when I make a new page i would much rather have it at the bottom of my list than the top.

Categories Q&A, Wordpress Tags hooks, order, page-attributes, pages, wp-admin Leave a comment

Order by optional meta key?

August 3, 2022August 2, 2022 by Magenaut

I’m building the sorting functionality for a custom post type, and I have a custom meta value for “Featured” posts. This value is set when you tick the checkbox, otherwise it is not set.

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

Sort on meta value but include posts that don’t have one

August 3, 2022August 2, 2022 by Magenaut

I’ve been modifying the built in WP search using the pre_get_posts filter, allowing the user to sort the posts (including a bunch of custom post types) by different fields.

Categories Q&A, Wordpress Tags order, pre-get-posts Leave a comment

Order Admin sub-menu items?

August 3, 2022August 2, 2022 by Magenaut

I am adding items to a CPT Admin menu using add_submenu_page which works great, but they are added to the bottom of the sub-menu after the CPT options. I want to be able to have them on top , but I suppose this question can also apply to ordering all Admin based sub-menu items.

Categories Q&A, Wordpress Tags admin-menu, order, sub-menu Leave a comment

Sorting: custom query with orderby meta_value_num THEN by title

August 2, 2022August 1, 2022 by Magenaut

i try to run a custom post type query to match following criteria:
sort movies first by year in descending order,
after that (“inside” the year order) by title alphabetically.

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

Automatically set page order on create page

August 2, 2022August 1, 2022 by Magenaut

Is there a way to automatically set page order to the last order number upon creating new pages instead of having it set to 0?

Categories Q&A, Wordpress Tags automation, order, pages, post-editor Leave a comment

Order users by custom user meta

August 2, 2022August 1, 2022 by Magenaut

I’m showing a list of users like so:

Categories Q&A, Wordpress Tags order, user-roles, users Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 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