Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1084216

    hallo,
    arbeite mit einer temporären Kopie “dev.deingruen.de”. ich wollte
    1. statt Logo eine animierte Überschrift mit 2 zeilen im Logo haben und
    2. den debug.mode aktivieren.
    Aus der Enfold Dokumentation habe ich diese CSS-Snippets

    //——————————-
    // function – Text Logos
    //——————————-
    add_filter(‘avf_logo_final_output’, ‘avf_text_logo_final_output’);

    function avf_text_logo_final_output($logo) {
    $link = apply_filters(‘avf_logo_link’, home_url(‘/’));
    $logotext = “LOGO TEXT”;
    $subtext = “A CUSTOM SUBTEXT”;
    $subtext = “<span class=’subtext’>$subtext</span>”;
    $logo = “<span class=’logo’><h1>“.$logotext.$subtext.”</h1></span>”;

    return $logo;
    }

    To style the text logo and subtext please use the below CSS:

    /* Text logo styling */

    #top .logo,
    #top .logo a {
    overflow: visible;
    }

    #top .logo {
    background: gold;
    display: flex;
    align-items: center;
    padding: 15px;
    }
    #top .logo .subtext {
    font-size: 18px;
    color: #be0027;
    position: absolute;
    width: 100%;
    left: 0;
    top: 25px;
    }

    /* Hide subtext on scroll */
    #header.header-scrolled-full .subtext {
    display: none;
    }

    Debug-mode-Enfold:

    //set builder mode to debug
    add_action(‘avia_builder_mode’, “builder_set_debug”);
    function builder_set_debug()
    {
    return “debug”;
    }

    in die functions.php des enfold-child kopiert und bekomme diese Fehlermeldung:

    Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00a3b4e/dev.deingruen.de/wp-content/themes/enfold-child/functions.php:1) in /www/htdocs/w00a3b4e/dev.deingruen.de/wp-includes/pluggable.php on line 1251

    Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00a3b4e/dev.deingruen.de/wp-content/themes/enfold-child/functions.php:1) in /www/htdocs/w00a3b4e/dev.deingruen.de/wp-includes/pluggable.php on line 1254

    Jetzt habe ich keinen Zugang mehr zum Backend. Über FTP den Code wieder entfernt, aber die Fehlermeldung kommt weiterhin.
    Was kann ich noch tun?

    #1084217

    You can’t use CSS in a PHP-file.
    Leave the PHP-function (avf_text_logo_final_output) in the functions.php but move the CSS to the style.css.

    And before that just delete the functions.php or copy a fresh one from a backup (or original) child-theme to get back the admin-access.

    #1085046

    Hi hansloe,

    Please remove those codes from functions.php and put this instead:

    add_filter('avf_logo_final_output', 'avf_text_logo_final_output');
    function avf_text_logo_final_output($logo) {
        $link = apply_filters('avf_logo_link', home_url('/'));
        $logotext = "LOGO TEXT";
        $subtext = "A CUSTOM SUBTEXT";
        $subtext = "<span class='subtext'>$subtext</span>";
        $logo = "<span class='logo'><h1>".$logotext.$subtext."</h1></span>";
        return $logo;
    }
    
    //set builder mode to debug
    add_action('avia_builder_mode', "builder_set_debug");
    function builder_set_debug() {
        return "debug";
    }

    then this code you can either put in style.css of your child theme or in Quick CSS (located inside WP Dashboard, Enfold > General Styling):

    /* Text logo styling */
    #top .logo,
    #top .logo a {
        overflow: visible;
    }
    
    #top .logo {
        background: gold;
        display: flex;
        align-items: center;
        padding: 15px;
    }
    
    #top .logo .subtext {
        font-size: 18px;
        color: #be0027;
        position: absolute;
        width: 100%;
        left: 0;
        top: 25px;
    }
    
    /* Hide subtext on scroll */
    #header.header-scrolled-full .subtext {
        display: none;
    }

    @cg thanks for helping out :)

    Best regards,
    Nikko

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