Skip to content

Magenaut

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

query

Highlighting Sub topic in a post?

August 2, 2022August 1, 2022 by Magenaut

Have seen this sub topics highlighter in many blogs. It gives a special attraction to a sub topics used in the post.

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

Using dynamic conditions in ‘posts_where’ filter

August 2, 2022August 1, 2022 by Magenaut

I have the following code which gives be posts that are published in the last 100 days

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

What SQL Query to do a simple find and replace

August 2, 2022August 1, 2022 by Magenaut

Whenever I create a new website I first create a staging site on a subdomain like “stage.domain-name.com”.

Categories Q&A, Wordpress Tags customization, mysql, query, sql Leave a comment

How to order posts by modified date without using ‘query_posts’?

August 2, 2022August 1, 2022 by Magenaut

I have an example basic wordpress theme template here for you. First, please take a quick look at it to get an idea.

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

Custom $wpdb Query for Custom Post Type by Category

August 2, 2022August 1, 2022 by Magenaut

I am using the following code to output a list of items in my ‘documents’ Custom Post type by Year and Month.

Categories Q&A, Wordpress Tags query, wpdb Leave a comment

Show a different number of posts per page depending on context (e.g., homepage, search, archive)

August 2, 2022August 1, 2022 by Magenaut

In the Reading Settings, there is place to set the number of posts shown that affects the number of posts shown in all contexts. I’d like to show instead a certain number of posts on the homepage, and a different number of posts on pages like archive, search results, etc.

Categories Q&A, Wordpress Tags archives, plugins, posts, query Leave a comment

order by numeric value for meta value

August 2, 2022August 1, 2022 by Magenaut

I have read countless posts on ordering data by numeric value ( as opposed to string – it i have a numeric meta value and it gets ordered like this 1 11 12 2 233 etc as opposed to the way i want it

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

How to List Events by Year and Month Using Advanced Custom Fields?

August 1, 2022July 31, 2022 by Magenaut

I have a custom post type “Kalender_item” with a custom Date Field (YYMMDD). I want to list all the posts on a page sorted by Year and Month.

Categories Q&A, Wordpress Tags advanced-custom-fields, date-time, query Leave a comment

wp_query orderby title and meta key value (WP3.1)

August 1, 2022July 31, 2022 by Magenaut

I have a taxonomy wp_query and i would like to order the list by title and by meta value (numeric value)

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

How to use a custom post type as front page?

August 1, 2022July 31, 2022 by Magenaut

I would like to set a site’s front page to be a single post from a custom post type. I have been able to alter the request for my front page to a Custom Post Type archive with the following code (originally posted here):

Categories Q&A, Wordpress Tags custom-post-types, loop, query, wp-query Leave a comment
Older posts
Newer posts
← Previous Page1 … Page5 Page6 Page7 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