-
AuthorPosts
-
July 17, 2018 at 10:37 am #986343
Hello,
I’d like to use, only for a fixed screen ratio, another logo in the mobile-version of my website.
Could you help me finding a way to implement this?Kind regards,
E. MonacoJuly 17, 2018 at 2:49 pm #986450Hey E. Monaco,
We’ll try to help you with it.
What are your target screen sizes or devices? this is possible with css.Best regards,
NikkoJuly 17, 2018 at 4:09 pm #986487you mean something like this:
for making a difference between highresolution screens – like apple retina displays ?add_filter('avf_logo','av_change_logo_url'); function av_change_logo_url($url){ if (window.devicePixelRatio >= 2) { $url = "http://www.domain.com/wp-content/uploads/retina-logo.jpg"; } else { $url = "http://www.domain.com/wp-content/uploads/normal-logo.jpg"; } return $url; }
July 17, 2018 at 5:03 pm #986510by the way – there are some jQuery scripts which did that job for you.
if there was an image with same name but with a given suffix ( guenni2.jpg versus (Email address hidden if logged out) ) and the pixel ratio is more than 2 it will show the alternative image.you can see it here: http://webers-testseite.de/weber/retina/
the image on the left is the same resolution as the guenni2.jpg but i renamed it to guenni1.jpg
on the right there is the guenni2.jpg – if you look to that right image on retina displays the better resolution image is shown. ( (Email address hidden if logged out) )July 18, 2018 at 6:18 am #986776Hi,
Thanks for sharing and helping out @guenni007. Did you try that out and did you have any luck with it @emonaco?
Best regards,
RikardJuly 18, 2018 at 9:07 am #986843Hello all,
I was more thinking about different logos when the website is in a landscape resolution than when it is in a portrait resolution.
I’ll take a look on your answers and will come back to you.
Thanks and best Regards,
emonacoJuly 18, 2018 at 9:57 am #986860okay it’s alright, i found my solution, using javascript and css media queries.
Thanks for your help :) !
July 18, 2018 at 3:26 pm #987038 -
AuthorPosts
- You must be logged in to reply to this topic.