I'm using the Astra theme.
Header.php
Index.php
I'm a total noob. The website is for a town hall that has a small IT centre built onto it, and the IT centre has a logo while the hall itself does not. I'm trying to figure out how to have the logo appear at the top of the page for the IT centre part of the site, but omit it for the town hall part of the site. It seems the only way to do this is to mess with php and css. I think there's some sort of premium Astra add-on that enables you to do this, and so it's possible that the underlying code is designed in such a way as to prevent you from making these kinds of customisations without paying. However, I'm a noob and I can't really tell if this is the case.
Sorry if I haven't provided enough information. I'm sure you won't hesitate to let me know if I have.
I'm using the Astra theme.
Header.php
Index.php
I'm a total noob. The website is for a town hall that has a small IT centre built onto it, and the IT centre has a logo while the hall itself does not. I'm trying to figure out how to have the logo appear at the top of the page for the IT centre part of the site, but omit it for the town hall part of the site. It seems the only way to do this is to mess with php and css. I think there's some sort of premium Astra add-on that enables you to do this, and so it's possible that the underlying code is designed in such a way as to prevent you from making these kinds of customisations without paying. However, I'm a noob and I can't really tell if this is the case.
Sorry if I haven't provided enough information. I'm sure you won't hesitate to let me know if I have.
Share Improve this question asked Jun 6, 2019 at 11:10 ClubShrimpClubShrimp 12 bronze badges 1 |1 Answer
Reset to default 0You can achieve this using filter provided in Astra:
add_filter( 'astra_has_custom_logo', '__return_false' );
The above filter disables logo on the website. You will have to add this filter in your child theme's functions.php file inside if conditions of pages where you want to hide the logo.
<?php astra_header(); ?>
function call emits the logo. That'll be something theme-specific I'm afraid. Can you find that function in the theme? Does it emit the logo itself, possibly just a call tothe_custom_logo()
? It may also include another template_part that includes the logo. – Rup Commented Jun 6, 2019 at 12:20