Skip to content

Magenaut

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

functions

Set JPEG compression for specific custom image sizes

August 4, 2022August 3, 2022 by Magenaut

I use various custom image sizes (by add_image_size) and I have set my JPEG compression to 30% with this filter:

Categories Q&A, Wordpress Tags compression, filters, functions, images Leave a comment

Set posts of a custom post type to be private by default?

August 4, 2022August 3, 2022 by Magenaut

Say I created a custom post type called ‘Private Posts’ ($post_type = itsme_private_posts) and want all posts under the custom post type to be set to ‘Private’ automatically when published i.e. by default. How do I do it?

Categories Q&A, Wordpress Tags custom-post-types, functions, posts, private Leave a comment

Remove “Category:”, “Tag:”, “Author:” from the_archive_title

August 4, 2022August 3, 2022 by Magenaut

I have the following code in my theme’s archive.php:

Categories Q&A, Wordpress Tags archives, functions Leave a comment

ajax live search for post title

August 4, 2022August 3, 2022 by Magenaut

i m creating a AJAX live search to filter posts title in my wordpress theme.
As i write something in input it show all the post in result, Not filtering it to get custom post..

Categories Q&A, Wordpress Tags ajax, functions, html, jquery Leave a comment

Sort search results by post type

August 4, 2022August 3, 2022 by Magenaut

I need to sort my search results by custom post type. the problem: the order is custom.

Categories Q&A, Wordpress Tags custom-post-types, filters, functions Leave a comment

How to set and use global variables? Or why not to use them at all

August 4, 2022August 3, 2022 by Magenaut

UPDATE: My original question has been solved, but this is turning into a valid discussion about why not to use global variables, so I am updating the question to reflect that. The solution was <?php global $category_link_prop; echo esc_url( $category_link_prop ); ?> as @TomJNowell suggested.

Categories Q&A, Wordpress Tags functions, globals, php Leave a comment

Redeclare/Change Slug of a Plugin’s Custom Post Type

August 4, 2022August 3, 2022 by Magenaut

Is it possible to redeclare/change the slug of a plugin’s existing custom post type (without simply editing the plugin)?

Categories Q&A, Wordpress Tags custom-post-types, functions, slug Leave a comment

Best way of passing PHP variable between partials?

August 4, 2022August 3, 2022 by Magenaut

I have a variable in header.php, such as:

Categories Q&A, Wordpress Tags functions, variables Leave a comment

Add custom template page programmatically

August 4, 2022August 3, 2022 by Magenaut

I’m trying to add template page from a plugin,and my template page is in this plugin folder.Is this posible?Here is my code:

Categories Q&A, Wordpress Tags functions, page-template Leave a comment

What’s the difference between home_url() and site_url()

August 4, 2022August 3, 2022 by Magenaut

My understanding is that site_url() returns the location where the WordPress core files are.

Categories Q&A, Wordpress Tags functions, home-url, site-url, urls 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