Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1293646

    Hello,

    I have a white logo and menu on my front page and that works fine.
    On my other pages I have a white backround and you cant see the logo and the menu, I would like to have a black logo and menu on the other pages. Is there an option ?

    Thanks

    #1293668

    Hey henninglehmkuhle,

    Do you have a black version of the logo? Using css to default text to black except for the homepage, this may be possible.

    Best regards,
    Jordan Shannon

    #1293682

    Thanks for the fast answer !

    Yes I do.

    Okay, and how does that work ? Sorry, pretty new to enfold

    #1293693

    you can do it over the same filter in different ways ( one over url – the other over logo )

    As Jordan said – set the one logo you like to have on all pages except few other pages to the enfold options dialog.

    then put this in child-theme functions.php:

    function replace_logo_on_some_pages($logo){
        if(is_page(array( 'home', 1396, 1234, ))){ 
          $logo = "/wp-content/uploads/alternativ-logo.png";
        }
        return $logo;
    }
    add_filter('avf_logo','replace_logo_on_some_pages');

    or as mentioned above: via url:

    function av_change_logo_url($url){
        if(is_page(array( 'home', 1396, 1234, ))){ 
            $url = "/wp-content/uploads/alternate-logo.jpg";
        }
        return $url; 
    }
    add_filter('avf_logo','av_change_logo_url');

    the numbers are the page-ids – page names comes into quotation marks.

    if it is only the home or front_page or a single page replace that line with the array by

    if(is_front_page()){
    or
    if(is_home()){
    or
     if(is_page( 1234 )) {
    #1293700

    es ist sehr zu empfehlen, ein Child-theme zu nutzen. Das ist kein Zauberwerk und recht schnell eingerichtet. Es gibt auch ein vorgefertigtes Child-Theme in der Dokumentation zum download.: https://kriesi.at/documentation/enfold/child-theme/

    Alle kleinen nützlichen Tips die über die functions.php laufen sind so recht simple anzuwenden, und gehen auch in der Regel nicht bei einem Update des Eltern-Themas verloren.
    Gerade am Anfang einer Installation ist dies sehr simple zu machen. Sollte ein Thema schon recht fortgeschritten installiert sein bietet Enfold auch hier durch Übernahme der Einstellungen gute Möglichkeiten auch nachträglich noch umzustellen.

    #1293769

    Mhmm, it’s not working.

    Im trying it with this code :

    function replace_logo_on_some_pages($logo){
    if(is_page( 3386 )) {
    $logo = “/wp-content/uploads/2021/04/Element-1-4-1030×167.png“;
    }
    return $logo;
    }
    add_filter(‘avf_logo’,’replace_logo_on_some_pages’);

    But the logo stays black on the front page..

    #1293810

    and your front-page realy get that high ID ( 3386 ) ?
    and your front-page is a page? it might be a post?
    and the link to your alternative Logo – try the absolute path with https://domain/wp-content/ …etc

    best would be to have a live link for me to give better advice – if you like write me an email.

    function replace_logo_on_some_pages($logo){
       if(is_home()){
          $logo = "/wp-content/uploads/2021/04/Element-1-4-1030×167.png";
        }
        return $logo;
    }
    add_filter('avf_logo','replace_logo_on_some_pages');

    PS : i see now the dimensions of your “logo” – is it set as background ? and not in Enfold Options Dialog : “Logo” ?

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