Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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. Monaco

    #986450

    Hey 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,
    Nikko

    #986487

    you 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; 
    }
    #986510

    by 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) )

    #986776

    Hi,

    Thanks for sharing and helping out @guenni007. Did you try that out and did you have any luck with it @emonaco?

    Best regards,
    Rikard

    #986843

    Hello 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,
    emonaco

    #986860

    okay it’s alright, i found my solution, using javascript and css media queries.

    Thanks for your help :) !

    #987038

    Hi,

    Great, glad you found a solution and thanks for the feedback. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.