XF 2.3 extra.less Replacing text with image that redirects

SurrealWorld

New member
1749311659912.webpI am trying to replace the 'PC GAMING' text with a clickable image that redirects, what would I need to type in extra.less to achieve this?

What do I do for xenforo page ID's that have decimals (ie: subnodes)

Thanks for all your help, I am super nooby.
Check out my new site, SURREALWORLD.org
 

Attachments

  • 1749311641715.webp
    1749311641715.webp
    92.5 KB · Views: 2
Do this,

Acp > appearance> styles > style properties > Your Style > Search > Forum_view

Once that template is open look for....assuming you're on xf 2.3.6, should be the first line, which should look like this

Code:
<xf:title page="{$page}">{$forum.Node.title}</xf:title>

Replace that line of code with this:
Code:
<xf:if is="$forum.node_id == 67">
    <xf:title page="{$page}">Pc Gaming</xf:title> <!-- browser tab title -->
    <h1 class="p-title-value" style="text-align:center;">
        <a href="https://domain.com" target="_blank">
            <img src="https://domain.com/image.png" alt="Subforum 67" style="max-height: 80px;">
        </a>
    </h1>
<xf:else />
    <xf:title page="{$page}">{$forum.Node.title}</xf:title>
</xf:if>

67 is your pc gaming node id, just replace the link you want and the image you want to use.
 
Last edited:
The width is what I was mostly worried about, but dude is fully optimized for adsense 😄
Do this,

Acp > appearance> styles > style properties > Your Style > Search > Forum_view

Once that template is open look for....assuming you're on xf 2.3.6, should be the first line, which should look like this

Code:
<xf:title page="{$page}">{$forum.Node.title}</xf:title>

Replace that line of code with this:
Code:
<xf:if is="$forum.node_id == 67">
    <xf:title page="{$page}">Pc Gaming</xf:title> <!-- browser tab title -->
    <h1 class="p-title-value" style="text-align:center;">
        <a href="https://domain.com" target="_blank">
            <img src="https://domain.com/image.png" alt="Subforum 67" style="max-height: 80px;">
        </a>
    </h1>
<xf:else />
    <xf:title page="{$page}">{$forum.Node.title}</xf:title>
</xf:if>

67 is your pc gaming node id, just replace the link you want and the image you want to use.
Thanks
 
Back
Top Bottom