Archived topic
Changing the header-widget-picture under special conditions
3 replies · Started by Hans-Hermann Loewer on July 13, 2020
Hallo Tom and team,
under "Changing the logo under specific conditions" you have the following filter-code:
_____
add_filter( 'generate_logo','tu_custom_about_logo' );
function tu_custom_about_logo( $logo )
{
// If we are on the about page, set our custom logo
if ( is_page( 'about' ) )
return 'URL TO OUR LOGO IN HERE';
// Or else, set the regular logo
return $logo;
}
______
Is it possible to have a filter for changing the picture in the header-widget the same way (for subpages a.s.o.)?
Herman
Hi there,
Widget area is handled differently so no filters unfortunately.
You will need a plugin like this:
https://en-ca.wordpress.org/plugins/content-aware-sidebars/
Hi Leo,
and thank you for that advice!
I tried that plug-in, and that is a very good solution, ... works great!
No problem :)