Z
Z
zeaovede2021-10-13 12:35:14
css
zeaovede, 2021-10-13 12:35:14

How to load styles in custom header in wordpress?

How to load styles from functions.php to custom header.php page? The problem is the following. Loaded my html code in header.php and now styles from parent-child theme are not applied. I return the stock header.php everything works. How to save custom header.php and force styles from parent-child theme to be loaded there? Through my own observations, I found one way, namely to write in the head of an existing theme <? php wp_head (); ?> and then the styles from functions are also loaded into the custom header.php, but in the code then the custom title + the title that wp offers, is a mess in general. Of course, you can leave only the wordpress title, and cut it out from the custom, but again, I'm not sure that this will be the best solution. Tell me the best way to deal with the situation

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Zolin, 2021-10-13
@artzolin

I strongly advise against disabling the function wp_head()in header.php , you will run into problems over and over again, the necessary plugins and functions will not work for you.
To control the tag <title>, use the hookwp_title

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question