Tagged: mobile logo
-
AuthorPosts
-
June 15, 2017 at 4:14 pm #808602
Hello!
I”m using the second mobile logo as described on the Enfold documentation. This is logo is also showed on tablets. What do I have te do to that the mobile logo is showed to the max of 500px? Thnx!
Used code:
add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo)
{
if(wp_is_mobile() )
{
$logo = “/wp-content/themes/enfold-child/images/logo-mobile.png”;
}
return $logo;
}June 15, 2017 at 6:44 pm #808680Hey Tim,
If you are familiar with CSS you can do so using media queries.
Best regards,
Jordan ShannonJune 16, 2017 at 9:56 am #808901Hello Jordan,
I did but that didn’t work. Can you give me the right code?
Greets
June 16, 2017 at 5:48 pm #809027Hi,
So you only want the logo to be displayed if the screen is under 500px?
Best regards,
Jordan ShannonJune 19, 2017 at 10:07 am #809701Hey Jodan,
Yes and more specific I want the mobile logo to be displayed till 500px.
June 19, 2017 at 3:41 pm #809828Hi,
Can you screenshot what the mobile logo looks like? I am seeing the same logo on the desktop, tablet and mobile.
Best regards,
Jordan ShannonJune 19, 2017 at 3:49 pm #809836Yes see the link below.
June 19, 2017 at 4:07 pm #809848Hi,
I am seeing that logo now at a screen width of 375px. So it does appear to show until 500px, unless I am misunderstanding. After 500px do you want the standard non-mobile logo to show?
Best regards,
Jordan ShannonJune 20, 2017 at 9:24 am #810242Yes that’s right.
June 20, 2017 at 4:16 pm #810448Hi,
Adding the following to quick css should work:
@media only screen and (max-width: 500px) { .logo img { opacity: 0; } .logo a { background-image: url(https://bb.nl/wp-content/themes/enfold-child/images/logo-mobile.png); background-repeat: no-repeat; background-size: contain; background-position: 50% 50%; }} @media only screen and (min-width: 500px) { .logo img { opacity: 0; } .logo a { background-image: url(https://bb.nl/wp-content/uploads/2014/12/bb-logo-payoff-schaduw.png); background-repeat: no-repeat; background-size: contain; background-position: 50% 50%; }}
Best regards,
Jordan ShannonSeptember 29, 2017 at 11:21 am #858423Hello Jordan,
A bit late.. but it worked thnx! You can close it.
Greets Tim.
September 29, 2017 at 5:03 pm #858529Hi,
Great! If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Mobile logo not on tablet’ is closed to new replies.