• I already broke my head thinking about it.

    How to add simple text next to logo? I already upload a logo and want add some text next to logo, in right side.
    Here i want add text https://c2n.me/3AYFueF.png

    I realized that the need to find and edit this action:

    do_action( 'storefront_header' );

    I research anything, don’t found where and don’w found solution(

    WordPress 4.5.3
    WooCommerce 2.6.4
    Storefront 2.0.7

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Aleksandr Mykoliuk

    (@mekalok)

    I can not understand in what files can I edit the layout?

    The easiest solution would be to add text to your logo…

    Or you can add code like this to your child themes function file.

    add_action( 'storefront_header', 'custom_text_next_to_logo', 25 );
    function custom_text_next_to_logo() {
        echo 'This is my custom text';
    }

    Then you’ll have to position it correctly with css.

    ok, thanks for advice, maybe i will do this.

    but i’m interesting, where i can edit layout? where is sources? tell me please )

    Or you can add code like this to your child themes function file.

    i added this function, but what i need write in css? what style i need to edit? i wrote

    .custom_text_next_to_logo {
    border-radius: 1em;
    padding: 1em;
    top: 15%;
    position: absolute;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%);
    max-width:180px }

    but doesn’t work

    Ok if you want to target the css you are going to have to change a couple things. First the php code, change to:

    add_action( 'storefront_header', 'custom_text_next_to_logo', 25 );
    function custom_text_next_to_logo() {
        echo '<span class="my-logo-text">This is my custom text</span>';
    }

    Now you can target the css class .my-logo-text

    Thread Starter Aleksandr Mykoliuk

    (@mekalok)

    thanks, man! )

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to add text to header?’ is closed to new replies.