-
AuthorPosts
-
April 5, 2024 at 9:40 pm #1439303
Hello,
I want to display a header with a width around 1100 pix
I can’t change it in the theme, only the height. Is it possible to change the width ?.But for mobile I want to use a different image, because when the logo is shred nobody can really read it.
Would be great if I could get any help. Thank you in advance
DoloresApril 6, 2024 at 6:27 pm #1439335Is it possible to get help please?
April 6, 2024 at 7:04 pm #1439344Hi,
Thank you for your patience, right now your site is using a full width header and footer, to limit the width of the header you will need to use the “Boxed” layout
so go to Enfold Theme Options ▸ General Layout ▸ Stretched Or Boxed Layout
and then set the width at Enfold Theme Options ▸ General Layout ▸ Dimensions ▸ Maximum Container width
To use a different logo on mobile try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:add_filter('avf_logo','av_change_logo'); function av_change_logo($logo) { if(wp_is_mobile() ) { $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png"; } return $logo; }
then change the image url to the image you want to use.
Best regards,
MikeApril 6, 2024 at 8:02 pm #1439353Hello Mike
thank you so much for taking time to help me!
Unfortunately it doesn’t work.
The logo still is small on my site. I uploaded it again and it still doesn’t work.
Haven’t tried the mobile logo yet, because if the large logo doesn’t work then it makes no sense.
Could you please have a look if there is anything what I am doing wrong? Thank you so much.
I have my password displayed in the private content if this helps you to figure out my problem.
DorisApril 6, 2024 at 8:30 pm #1439356Hi,
Perhaps I misunderstood your logo question, I thought that you wanted a different logo to show on mobile devices, but now I think that you want your logo to show larger so I did this for you, please check.
The trick is to copy the logo url from your media library and paste it into the logo field and then save, not to use the “upload” button, this will always use the small version on the image.Best regards,
MikeApril 6, 2024 at 9:10 pm #1439361Hi Mike, thank you once again very much for your help.
It looks great. I changed the space between logo and menu, I love it. Good to know the trick.
You understood me right. Of course I want to have a different logo on mobile (have displayed it in the private content).
Problem is that I don’t use a child theme, I always use the original. Can I add the changes there, too?
DorisApril 6, 2024 at 9:15 pm #1439363Hi,
If you are not using a child theme you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
then add the this code and save.add_filter('avf_logo','av_change_logo'); function av_change_logo($logo) { if(wp_is_mobile() ) { $logo = "/wp-content/uploads/2024/04/LogoMobile.png"; } return $logo; }
you may need to make the image url in the code your full path if this doesn’t work, I didn’t want to post your full url as I think you want it private.
Best regards,
MikeApril 6, 2024 at 9:50 pm #1439366Thank you Mike.
I did as you suggested, checked it several times and unfortunately it doesn’t work.Ok, I don’t want to steal more of your time. Enjoy your weekend.
Thank you.
Kindest regards
DorisApril 6, 2024 at 10:46 pm #1439367April 6, 2024 at 11:26 pm #1439368Wow. Thank you so much, Mike. It looks great. You are amazing with your knowledge and your help. This thread can be closed. You have solved my wishlist.
Happy Weekend
DorisApril 7, 2024 at 10:18 am #1439380Hi,
Great, I’m glad to hear that Mike could help you out. We’ll close this thread for now then, please open a new thread if you should have any further questions or problems.
Best regards,
Rikard -
AuthorPosts
- The topic ‘Header width and different logo on mobile’ is closed to new replies.