Skip to content

Magenaut

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

hooks

Add custom classes to anchor in wp_nav_menu

August 3, 2022August 2, 2022 by Magenaut

I want to add a custom class to anchors in wp_nav_menu outputs.

Categories Q&A, Wordpress Tags hooks, menus, navigation, theme-development, themes Leave a comment

WP Multisite: Adding pages on blog creation by default

August 3, 2022August 2, 2022 by Magenaut

I’d like to have a page added by default when a new site is created with WP Multisite.

Categories Q&A, Wordpress Tags hooks, multisite, pages Leave a comment

How to create thumbnails for PDF uploads?

August 3, 2022August 2, 2022 by Magenaut

I’m developing a website that needs to allow users, within Gravity Forms, to submit a PDF file and have a JPG thumbnail created of the first page of the PDF that is then displayed in the created post.

Categories Q&A, Wordpress Tags functions, hooks, images, pdf Leave a comment

Earliest hook to reliably get $post/$posts

August 3, 2022August 2, 2022 by Magenaut

What’s the earliest possible action I can hook into where I’ll be able to access the global $post/$posts variables on both the front and back ends? I’ve tried looking through the Codex reference, Adam Brown’s reference and skimming through the source several times but haven’t had much luck finding a good one.

Categories Q&A, Wordpress Tags actions, filters, hooks Leave a comment

How to use wp.hooks.addAction() in React JS/Gutenberg?

August 3, 2022August 2, 2022 by Magenaut

I am able to successfully use wp.hooks.applyFilters() and wp.hooks.addFilter(), but I’m not able to render a React Component using wp.hooks.addAction(). However, the console.log() runs just fine within the callback for an action. This is my code:

Categories Q&A, Wordpress Tags block-editor, hooks, javascript Leave a comment

Filter specific shortcode output?

August 3, 2022August 2, 2022 by Magenaut

Is there a hook in WordPress that I can use to filter the output of a specific shortcode? Something like this:

Categories Q&A, Wordpress Tags filters, hooks, shortcode Leave a comment

Is there a WordPress core & plugins update action hook?

August 3, 2022August 2, 2022 by Magenaut

I would like to run several actions on a website once WP core or any of the plugins have been updated using the built-in update process. Is there a way to do it?

Categories Q&A, Wordpress Tags hooks, updates Leave a comment

How to intercept a 404 error

August 3, 2022August 2, 2022 by Magenaut

I’d like to intercept 404 errors and do some things before to show the 404 error page.

Categories Q&A, Wordpress Tags 404-error, hooks Leave a comment

Is there a hook that fires before an ajax call?

August 3, 2022August 2, 2022 by Magenaut

I’m using the standard admin-ajax.php method of doing ajax. So I have some functions like this:

Categories Q&A, Wordpress Tags ajax, hooks Leave a comment

Add site options UI in Multisite Sites > Infos page

August 3, 2022August 2, 2022 by Magenaut

I want to add meta fields for the sites in my network (such as a thumbnail and a category). I know how to do this using get/add/update_site_option, but I’m wondering where I could put the UI to manage those meta fields.

Categories Q&A, Wordpress Tags hooks, multisite, options, user-interface Leave a comment
Older posts
Newer posts
← Previous Page1 … Page9 Page10 Page11 … Page13 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