I’m trying to customize a theme, and I see that the header.php calls “wp_head()”. I can’t seem to find an implementation of this in the theme, so I presume there is a default implementation that implements, for example, the Color Options settings as specified on the admin page.
So my related questions are:
- Is there somewhere I can see this default implementation?
- Can this default implementation be “turned off”?
- Can the “Color Options” option be disabled in the admin screen for the theme?
Please feel free to point me to relevant documentation if that would be easier. I’ve looked at the reference pages for the wp_head() function and the corresponding wp_head action hook, but they don’t seem to provide enough information for me to tackle the questions above.
Thanks.
wp_head()
function simply triggers thewp_head
action hook that runs all callback functions that were added to this hook usingadd_action('wp_head','callback_function');
So there is no default implementation.
Like we said before since there is no default implementation you need to find the add_action’s that hook to wp_head and remove them using remove_action for example if this is the add_action:
then to remove it just add
I’m assuming that your theme as some kind of options panel that let you chose the color options, so to disable it it depends on the theme it self but it should be in one of the theme files, knowing what theme you are talking about would help.
Update
there are some action by defult running when wp_head is fired and to remove them just use:
other then that look for
add_action('wp_head' ...
in theme files and plugins.