Where is the markup in Appearance ->Custom Header rendered?

Moved Technical Support
  • I'd like to know where in the template code (in my case, Persona theme), the markup pasted via the admin panel in the Custom Header field is rendered in the templates.

    Above the form it states "Enter custom HTML here (ex. JavaScript, Meta Tags, etc.), which will be appended to the <head> section of your forum's markup. "

    Does the ex. mean 'excluding' or 'for example''?

    I can see tags like {{customCSS}} in header.tpl but nothing for this custom header HTML. Also, if it gets appended to the <head> tag then if I place divs in there, I'm going to end up with invalid code.

    I'd actually like the custom header markup to appear above everything, including the main NodeBB menu.

  • "ex." Meaning "for example" (I've never heard of it being used for "excluding" before)

    If you want a div to show up on the top of all pages, use a global header HTML widget

  • @psychobunny I hadn't either, I just assumed it was a typo or bad English ; in either case, it is ambiguous. A correct contraction for excluding would be 'excl.' or similar.

    What do you mean by widget? Is that something I need to install via the admin interface or write myself as part of a template?

  • Administration > Extend > Widgets.

    However this will put it below your main navbar by default.

  • They are appended into the {{customJS}} section, which is inside <head />, so you'll probably want to keep html out of there.

    You can use jQuery to add your own html in and inject it into the site, however...

  • @julian thanks. So this is the only way to do this? If so, I'll just do a jQuery append as you say.


Suggested Topics