[Support request] Can I template what is generated by do_action( ‘generate_header’ ); ?

Home Forums Support Can I template what is generated by do_action( ‘generate_header’ ); ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1345106
    Jason

    Hi there, I hope you are doing well and staying safe!!

    I am trying to add a bit of custom PHP in my theme in order to create a dark mode toggle. I can’t figure out where the generate_header action is coming from and I would appreciate advice on the best practice for how to add custom PHP in that spot in my child theme. Ideally, this is where I’d like to put it: https://imgur.com/pIwckWU

    Thanks very much!

    #1345255
    David
    Staff
    Customer Support

    Hi there,

    you can use the generate_after_header_content hook to add your content in that place.

    #1353166
    Eaydman

    @Jason, Have you got darkmode to work ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.