Tagged: Blog
-
AuthorPosts
-
October 29, 2020 at 7:43 pm #1256862
Hello, I would like to add an image (a logo) to my blog page. I am using the default grid model, with 3 columns. I don’t want the logo to appear on the single posts afterwards, only on the main blog page (at the top of the page, just below the header). How can I do this without having to use the advanced layout builder?
Thank you very much in advance.
Best regards
AudreyOctober 30, 2020 at 7:57 pm #1257129Hey laboiteapixels12,
Could you please attach a mockup of what you’re trying to achieve?
Best regards,
VictoriaNovember 2, 2020 at 4:57 pm #1257650Hi,
How can I attach images ? There is no way to upload an image..
Thank you in advance,Best regards
AudreyNovember 2, 2020 at 5:16 pm #1257653Hi,
You can upload your screenshots on imgur.com or Dropbox public folder and post the links here :)
Cheers!
YigitNovember 2, 2020 at 5:40 pm #1257663Hi,
This is two images. On the first, you can the the logo (“blog”) on the sidebar. I would like to add this logo above the posts on the mobile view (second image)
https://drive.google.com/file/d/1bMnk8UkS56RGfXK04MOwLKrjeKQmJufT/view?usp=sharing
https://drive.google.com/file/d/1zrGw88-1KRO98gHzuSp28dgafp41uF8-/view?usp=sharingThank you very much
November 3, 2020 at 8:58 am #1257897Hi,
Thanks for the update. The screenshots you posted are not shared publicly, so we can’t view them. Please share them publicly so that we can access them.
Also, why don’t you want to use the layout builder to add the image?
Best regards,
RikardNovember 3, 2020 at 10:12 am #1257917Hi,
Sorry, this is the sreenshots :
https://drive.google.com/file/d/1zrGw88-1KRO98gHzuSp28dgafp41uF8-/view?usp=sharing
https://drive.google.com/file/d/1bMnk8UkS56RGfXK04MOwLKrjeKQmJufT/view?usp=sharingI don’t want to use the layour builder because I have many blog categories, and I don’t want to create a custome page for each category..
Thank you,
AudreyNovember 3, 2020 at 12:20 pm #1257962Hi Audrey,
Please add following code to bottom of Functions.php file in Appearance > Editor and change image URL
add_action('ava_after_main_title','blog_ava_after_main_title'); function blog_ava_after_main_title(){ if(is_home( 'blog')){ $output = "<img class='banner-img' src='https://kriesi.at/wp-content/themes/kriesi/images/logo.png'>"; echo $output; } }
You can also style your image using banner-img class. To hide it on desktop, you can add following code to Quick CSS field in Enfold theme options > General Styling
@media only screen and (min-width: 768px) { .banner-img { display: none; } }
Best regards,
YigitNovember 3, 2020 at 6:58 pm #1258103Hi,
I have a child theme. Will the code work if I copy it to the child theme’s functions file ?
Thank’s a lotNovember 3, 2020 at 7:00 pm #1258108Hi,
Yes, it will. It is actually better that you have a child theme, otherwise you would need to add the code again each time you update the theme :)
Best regards,
YigitNovember 12, 2020 at 7:30 pm #1260203Hi,
It’s almost perfect. Your code only works on the category pages of the blog. But not on the blog’s default page. See it on the captures :
https://drive.google.com/file/d/1xx1FjsHgq_yJc0KdNxp70mT7v7Bxmzh3/view?usp=sharing
https://drive.google.com/file/d/1CmaD2C0bytJuQPCJLxO0HPnTTJTBRfL7/view?usp=sharingThank’s for your help,
AudreyNovember 25, 2020 at 3:01 pm #1263009Hey Audrey,
Sorry for my late reply!
Could you please create temporary admin logins and post them here privately so we can look into it? :)
Cheers!
YigitDecember 2, 2020 at 4:51 pm #1264528This reply has been marked as private.December 13, 2020 at 6:11 pm #1266909Hi,
Sorry for the very late reply and thanks for the login and links, I tested the solution above in your child theme because I didn’t see it activate on your site, I also added this css to center the image:@media only screen and (max-width: 767px) { .banner-img { display: block; margin: auto; padding-top: 30px; height: 200px; } }
It seems to show on your Blog page & your category pages, please clear your browser cache and check.
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.