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

    Is there a preferred method for adding a text widget in the header section next to the logo?
    As a workaround, I’ve added text to the logo graphic itself, which I’m certain is not the best option.

    Any suggestions or can someone please help. thanks

    • This topic was modified 6 years, 7 months ago by LesleyJean.
    #954744

    it depends on what text and how many text you like to display:
    As you see here in the board on top the Kriesi Logo is only the brand image (K) with additional text.
    This could be obtained with Enfold presetted filters.
    For Example if you like to have the wordpress name of the site and description to your logo:

    add_filter('avf_logo_subtext', 'kriesi_logo_addition');
    function kriesi_logo_addition($sub)
    {
      $sub .= "<span class='logo-title'>";
      $sub .= get_bloginfo( 'name', 'display' );
      $sub .= "</span>";
      $sub .= "<span class='logo-title logo-subtitle'>";
      $sub .= get_bloginfo( 'description', 'display' );
      $sub .= "</span>";
      return $sub;
    }

    on using this filter it is possible to show besides your logo f.e. the actual page title :

    add_filter('avf_logo_subtext', 'kriesi_logo_addition');
    function kriesi_logo_addition($sub)
    {
      $sub .= "<a class='page-title' href= '#'>";
      $sub .= "<span class='the-title'>";
      $sub .= get_the_title();
      $sub .= "</span>";
      $sub .= "</a>";
      return $sub;
    }

    there has to be css fittings to see the inserted elements

    etc. pp
    If you like to have a widget area – see here: https://kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/

    #954920

    Hello thanks for the feedback!
    Where would I make this change? In the admin area? In a specific php file?

    #955430

    the code above and alot of snippets you can find here on board or on: https://kriesi.at/documentation/enfold/code-snippets/ are for functions.php of the child-theme
    but if you like to use one of the codes above (maybe the first) you will see on backend first none. Because the subs are there but not visible because there is some css missing too , to get them visible besides the logo.

    for example here on board on top the info fades away on scrolling:
    The amount of left and top positioning depends on logo size and header size etc. this is an Individual case decision

    .logo img{float: left}
    #top .logo, #top .logo a {overflow: visible }
    #top .subtext {float: left; position: relative}
    
    #top .logo-title {
    transition: opacity 0.4s ease-out 0s;
    -moz-transition: opacity 0.4s ease-out;
    -webkit-transition: opacity 0.4s ease-out;
    -o-transition: opacity 0.4s ease-out;
        color: #4678ae;
        font-size: 44px;
        font-family: "Comfortaa","HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif !important;
        font-weight: bold !important;
        left: 7px;
        opacity: 1;
        position: absolute;
        top: -12px;
        white-space: nowrap;
    }
    
    #top .logo-subtitle {
        color: #aaa !important;
        font-family: "Comfortaa","HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif !important;
        font-size: 18px !important;
        left: 10px;
        top: 18px !important;
        font-weight: normal;
    }
    
    #top .header-scrolled .logo-title {
    opacity: 0;
    filter: alpha(opacity=0);
    }
    #955538

    Hi,

    Thanks for helping out @guenni007. Did you have any luck with the suggestions above @lesleyJean?

    Best regards,
    Rikard

    #956629

    Thank you both both for your help.
    That worked just fine @guenni007.

    I added the following the the functions.php file via admin panel and added the sample CSS and modified to my liking.

    add_filter(‘avf_logo_subtext’, ‘kriesi_logo_addition’);
    function kriesi_logo_addition($sub)
    {
    $sub .= “<span class=’logo-title’>”;
    $sub .= get_bloginfo( ‘name’, ‘display’ );
    $sub .= “</span>”;
    $sub .= “<span class=’logo-title logo-subtitle’>”;
    $sub .= get_bloginfo( ‘description’, ‘display’ );
    $sub .= “</span>”;
    return $sub;
    }

    #957662

    Hi,

    Glad we could help!
    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    To know more about enfold features please check – http://kriesi.at/documentation/enfold/
    Thank you for using Enfold :)

    Best regards,
    Basilis

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Need help adding a text widget to header next to logo’ is closed to new replies.