• Resolved mplusplus

    (@mplusplus)


    Hi

    I can manipulate wp_head from functions.php, but not from within custom-template pages.
    Is it possible to use wp_head in custom template page code? How?

    Thanks.

    • This topic was modified 4 years, 4 months ago by mplusplus.
Viewing 2 replies - 1 through 2 (of 2 total)
  • It depends on how the template is structured. Most templates will call get_header() right off and inside the header template, the wp_head action happens. Then the rest of the template is inside the body tag.
    If your template adds an action for wp_head first thing, and then calls get_header(), then it should work fine.

    Thread Starter mplusplus

    (@mplusplus)

    You are a legend! It worked like a charm ??

    Thanks so much.

    • This reply was modified 4 years, 4 months ago by mplusplus.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Manipulating “wp_head” works from functions.php, but not from custom-template.’ is closed to new replies.