XF 2.0 Having some trouble with logo URL on mobile devices

Court

Member
Howdy folks!

Our forum is on Xenforo 2.0 and we're having a bit of a weird problem with the URL for the logo.

We are using the option to Link Logo to Home Page URL as we want the logo to link to our main site (not back to the forum home).
-> On computers / in desktop mode, this works as intended
-> On mobile devices / small screens, this does NOT work - the logo links to the forum home instead of to our Home Page URL that is set in options.

I've been all over the place in settings and simply don't see how to change or fix this. I tried editing the PAGE_CONTAINER template and changing the URL directly, but this too only affects the desktop version of the site an not mobile!

Any ideas?

If you want to see for yourself: https://electricbikereview.com/forum
 

oman

Well-known member
Howdy folks!

Our forum is on Xenforo 2.0 and we're having a bit of a weird problem with the URL for the logo.

We are using the option to Link Logo to Home Page URL as we want the logo to link to our main site (not back to the forum home).
-> On computers / in desktop mode, this works as intended
-> On mobile devices / small screens, this does NOT work - the logo links to the forum home instead of to our Home Page URL that is set in options.

I've been all over the place in settings and simply don't see how to change or fix this. I tried editing the PAGE_CONTAINER template and changing the URL directly, but this too only affects the desktop version of the site an not mobile!

Any ideas?

If you want to see for yourself: https://electricbikereview.com/forum

Would you please be able to try switching over to XenForo's default style on your mobile device and see if the same thing happens?

This will determine whether the issue is isolated to the specific style you are using, or whether it's an issue with a board related setting.

If things behave normally in the default style, there might be a style property specific to your style that lets you set the logo's link/url.
 

Court

Member
Hmm... Reverting to the default style makes the logo completely disappear. So it does seem to be set by the style. Do you know where in the style properties I should look?

1524418700422.png
 

M@rc

Well-known member
For mobile you'll have to search for this :
Code:
<div class="p-nav-smallLogo">

<a href="/forum/">
<img src="//electricbikereview.com//wp-content/assets/2015/12/ebr-logo-white-lg.png" alt="Electric Bike Forum - Q&amp;A, Help, Reviews and Maintenance">
</a>

</div>
It links to the forum while the desktop version links to the main site.
 

Court

Member
This is what I currently have for that section in the PAGE_CONTAINER template:

<div class="p-nav-smallLogo">
<a href="{{ ($xf.options.logoLink && $xf.homePageUrl) ? $xf.homePageUrl : link('index') }}">
<img src="{{ base_url(property('publicLogoUrl')) }}"
alt="{$xf.options.boardTitle}"
{{ property('publicLogoUrl2x') ? 'srcset="' . base_url(property('publicLogoUrl2x')) . ' 2x"' : '' }} />
</a>
</div>


I tried updating the link to <a href="https://electricbikereview.com"> in that template, but it didn't have any effect on the site behavior.
I also tried updating it to point to https://www.google.com (just to test) and that didn't change anything either, on mobile or desktop view
 
Top