XF 2.3 Text in header

williamt

Member
Licensed customer
I been trying to figure out how to add text in my header instead of a logo image any ideas how to do this?
 
You can edit the PAGE_CONTAINER template (FREE)
Find:
HTML:
<div class="p-header-logo p-header-logo--image">
    <a href="{{ ($xf.options.logoLink && $xf.homePageUrl) ? $xf.homePageUrl : link('index') }}">
        <xf:macro id="style_variation_macros::picture"
            arg-property="publicLogoUrl"
            arg-propertyRetina="publicLogoUrl2x"
            arg-width="{{ property('publicLogoWidth') }}"
            arg-height="{{ property('publicLogoHeight') }}"
            arg-alt="{$xf.options.boardTitle}" />
    </a>
</div>

                <xf:ad position="container_header" />
            </div>
        </div>
    </header>

Replace by:
HTML:
<div class="p-header-logo p-header-logo--image">
    <a href="{{ ($xf.options.logoLink && $xf.homePageUrl) ? $xf.homePageUrl : link('index') }}">
        Your Text
    </a>
</div>

And
HTML:
<div class="p-nav-smallLogo">
    <a href="{{ ($xf.options.logoLink && $xf.homePageUrl) ? $xf.homePageUrl : link('index') }}">
        <xf:macro id="style_variation_macros::picture"
            arg-property="publicLogoUrl"
            arg-property2x="publicLogoUrl2x"
            arg-width="{{ property('publicLogoWidth') }}"
            arg-height="{{ property('publicLogoHeight') }}"
            arg-alt="{$xf.options.boardTitle}" />
    </a>
</div>

Replace by:
HTML:
<div class="p-nav-smallLogo">
    <a href="{{ ($xf.options.logoLink && $xf.homePageUrl) ? $xf.homePageUrl : link('index') }}">
        Your text
    </a>
</div>

Or use an add-on (PAID)
 
Thanks Andy that worked but I should have made myself clearer I want to be able to add the text in admin style properties basic options so its not the same text on each style need the option of adding text or logo in the admin section like my example below. I have made this in the development mode and added the properties but its not working only showing the logo and no text when I click the text radio button.

logo or text.webp
 
Last edited:
Back
Top Bottom