Skip to content

Magenaut

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

functions

Gutenberg disallow certain custom blocks but keep all core blocks?

August 3, 2022August 2, 2022 by Magenaut

I’m writing a function to allow only some custom blocks – essentially I want to register all the blocks, then based on a database table of ‘selected’ blocks disallow any other custom block.

Categories Q&A, Wordpress Tags block-editor, functions, plugins Leave a comment

Counting number of posts in a category and its sub categories and displaying result using shortcode

August 3, 2022August 2, 2022 by Magenaut

I am trying to create a shortcode to display the posts count in a category.
I have successfully done this using this code:

Categories Q&A, Wordpress Tags categories, functions, php, shortcode, taxonomy Leave a comment

Add multiple custom fields to the general settings page

August 3, 2022August 2, 2022 by Magenaut

What I would like to do is to add a few custom fields to the general settings.
This is the code that I’m using. It works alright but I just cant figure how to add more fields.

Categories Q&A, Wordpress Tags customization, functions, options, settings-api, user-registration Leave a comment

WordPress 3.1 – How does one add sticky post capabilities to post types

August 3, 2022August 2, 2022 by Magenaut

In wordpress 3.1 they finally added the option of allowing posts belonging to a custom post type to be marked as “sticky”… what I can’t figure out though is how to enable this so the admin menu option shows up.

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

Get the ID of the page a menu item links to?

August 3, 2022August 2, 2022 by Magenaut

I am currently using a custom walker to customize the output of wp_nav_menu(), and I am trying to add additional information to the <a> tags.

Categories Q&A, Wordpress Tags functions, menus, pages Leave a comment

How to change default position of WP meta boxes?

August 3, 2022August 2, 2022 by Magenaut

Im wondering if there is a way to change the default position of WordPresses meta boxes such as “featured image” for custom post types without having to drag them manually?

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

Is it possible to disable a function of a parent theme?

August 3, 2022August 2, 2022 by Magenaut

I was wondering whether it is possible to completely disable a function that is called in a parent theme’s functions.php and if so, how? (Of course without deleting the function. Rather by adding something to functions.php of the child theme.)

Categories Q&A, Wordpress Tags child-theme, functions, php Leave a comment

remove empty paragraphs from the_content?

August 3, 2022August 2, 2022 by Magenaut

Hey guys,
I simply want to prevent the creation of empty paragraphs in my wordpress post. That happens quite often when trying to manually space content.

Categories Q&A, Wordpress Tags filters, functions, wp-autop Leave a comment

remove_action on after_setup_theme not working from child theme

August 3, 2022August 2, 2022 by Magenaut

I am trying to remove a theme action for an elegant-themes theme using a child theme..
This works when I remove action after add_action code anywhere in the parent theme functions.php.
However, it does not work when I add it from child theme functions.php.

Categories Q&A, Wordpress Tags actions, child-theme, functions, themes Leave a comment

Dynamically add sub-categories to any category in the menu

August 3, 2022August 2, 2022 by Magenaut

I have a menu with a combination of pages and categories. I need to loop through the menu and if it finds a category automatically add all child-categories as a submenu.

Categories Q&A, Wordpress Tags functions, menus Leave a comment
Older posts
Newer posts
← Previous Page1 … Page17 Page18 Page19 … 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