I have done a lot of search on it, most of the people are saying
wp_head() is located in wp-includes/general-template.php
wp_head is in default-filter.php in wp-includes
But I want to know where the html/php file placed in file directory that is rendered by wp_head(), so I can edit that file. Thanks
wp_head() is located in wp-includes/general-template.
php wp_head(); ?> is a hook that allows WordPress, themes, and plugins to add HTML wherever it is placed. WordPress uses it to output all the scripts and stylesheets from themes and plugins between the <head></head> tags of your theme.
To find the file and edit it yourself go to wp-content > themes > your-theme-name > header. php. You can then open it in a code editor and make any changes you need to.
Action hooks are placeholders where code is dynamically added to a theme. What this means is that the wp_head and wp_footer functions act as placeholders for plugins to insert code to the <head> and <footer> of the theme respectively.
The wp_head()
function simply calls all functions hooked to the wp_head
action. Various functions will be hooked to this action, they may reside in the WordPress core, or perhaps in plugins you may be using, or even in your theme's functions.php file.
To my knowledge, there isn't a specific wp_head template 'file' that you can edit.
Ref:
Following https://codex.wordpress.org/Function_Reference/wp_head
wp_head() is located in wp-includes/general-template.php.
If you want edit something, execute a Control+MAJ+F (Find in folder) in wp-includes and it gives you the file where the specific content should be edited.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With