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:
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.
Is there somewhere I can see this
wp_head() function simply triggers the
wp_head action hook that runs all callback functions that were added to this hook using
So there is no default implementation.
Can this default implementation be “turned off”?
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
Can the “Color Options” option be disabled in the admin screen for the theme?
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.
there are some action by defult running when wp_head is fired and to remove them just use:
remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'feed_links', 2); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'feed_links_extra', 3); remove_action('wp_head', 'start_post_rel_link', 10, 0); remove_action('wp_head', 'parent_post_rel_link', 10, 0); remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
other then that look for
add_action('wp_head' ... in theme files and plugins.