[Resolved] Changing the header-widget-picture under special conditions

Home Forums Support [Resolved] Changing the header-widget-picture under special conditions

Home Forums Support Changing the header-widget-picture under special conditions

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1362486
    Hans-Hermann Loewer

    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

    #1362614
    Leo
    Staff
    Customer Support

    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/

    #1365369
    Hans-Hermann Loewer

    Hi Leo,

    and thank you for that advice!

    I tried that plug-in, and that is a very good solution, … works great!

    #1365780
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.