-
AuthorPosts
-
November 18, 2020 at 3:28 am #1261193
Hi There,
I’m working with a long vertical logo that overhangs the header, I have a workaround for the pages but not for the blog. I used the code below to add a different logo to the blog page and single post which worked well but the logo doesn’t change on the blog categories page or archives page.Also is it possible to increase the padding at the top of the page on the blog, single post, categories and archives pages?
function add_custom_blog_logo(){
?>
<script>
jQuery(window).load(function(){
jQuery(‘.blog .logo img’).attr(‘src’,’https://image.png’);
jQuery(‘.single-post .logo img’).attr(‘src’,’https://image.png’);
});
</script>
<?php
}
add_action(‘wp_footer’, ‘add_custom_blog_logo’);November 18, 2020 at 4:18 am #1261195I managed to increase the padding at the top of the blog pages, just need to fix the logo.
November 20, 2020 at 12:03 am #1261660Hi Byrne,
Can you please explain a bit more, which logo you need where?
Best regards,
VictoriaNovember 23, 2020 at 10:55 pm #1262511Hi There,
I have posted screenshots below.
I need the logo on the archive and categories pages to be the same as the single post.
Cheers JaneNovember 24, 2020 at 12:08 am #1262545Hi Byrne,
Thank you.
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaApril 8, 2021 at 12:27 am #1293146Hi There,
This site is now live.
I have added a different logo on the single blog pages but it isn’t showing on the category pages. I used the code below to change the logo. Could someone help with the script for the category pages?
function add_custom_blog_logo(){
?>
<script>
jQuery(window).load(function(){
jQuery(‘.blog .logo img’).attr(‘src’,’https://bluecarrot.co.nz/wp-content/uploads/2020/11/blue-carrot-catering-logo-blog-1.png’);
jQuery(‘.single-post .logo img’).attr(‘src’,’https://bluecarrot.co.nz/wp-content/uploads/2020/11/blue-carrot-catering-logo-blog-1.png’);
});
</script>
<?php
}
add_action(‘wp_footer’, ‘add_custom_blog_logo’);April 10, 2021 at 8:18 am #1293616Hi,
Please try replacing your current code with this:
function add_custom_blog_logo(){ ?> <script> jQuery(window).load(function(){ jQuery('.blog .logo img').attr('src','https://bluecarrot.co.nz/wp-content/uploads/2020/11/blue-carrot-catering-logo-blog-1.png'); jQuery('.single-post .logo img').attr('src','https://bluecarrot.co.nz/wp-content/uploads/2020/11/blue-carrot-catering-logo-blog-1.png'); jQuery('.category .logo img').attr('src','https://bluecarrot.co.nz/wp-content/uploads/2020/11/blue-carrot-catering-logo-blog-1.png'); }); </script> <?php } add_action('wp_footer', 'add_custom_blog_logo');
Best regards,
Rikard -
AuthorPosts
- You must be logged in to reply to this topic.