Avada Forums Community Forum Add html to top of a page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • skoutariotis
    Participant
    Post count: 3

    NOT to the home page, I done that, but any other page.
    I’d like to add some of my own html code at the top of a page.
    Would be nice to know how to access all html to any page.
    Any help would be appreciated!
    Thank you in advance!

    marklchaves
    Participant
    Post count: 873

    Hello @skoutariotis,

    You should be able to use the Avada avada_header PHP hook.

    Here’s a screengrab of a simple demo I just wrote.

    https://share.getcloudapp.com/12u48DR0

    You’ll see that my code won’t display the custom HTML for my sample-page. Replace that with the slug for your homepage.

    Learn more about Avada hooks here.

    https://theme-fusion.com/documentation/avada/avada-for-developers/avada-builder-hooks-actions-filters/

    Enjoy!

    marklchaves
    Participant
    Post count: 873

    Here’s the source code if anyone’s interested.

    https://gist.github.com/marklchaves/0076be104632004ea08c01b672727be3

    Cheers!

    skoutariotis
    Participant
    Post count: 3

    Thank you for that info, I appreciate it!
    Man… I gotta learn php! Been in my bucket list for a loooong time, but brain is mush now days, don’t work as well as it used to! I guess after 30+ years of computers, it’s finally all used up! LOL
    Thanks again!

    marklchaves
    Participant
    Post count: 873

    Hi @skoutariotis,

    You’re welcome. Glad to help 🙂

    Learning PHP isn’t a bad goal to have if you’re supporting WordPress sites. Learning how to write WordPress PHP hooks is even better!

    Enjoy!

    Mark

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