Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #108938
    INFOYED
    Participant

    I want to add text to the header’s right sidebar. I have looked at the source codes and found in the “catchkathmandu-functions.php” file that “function catchkathmandu_header_right()” function prepares the menu.

    To add text instead of the menu, what should I write in the place of “get_sidebar( ‘header-right’ );” function.
    ========================================
    /**
    * Shows Header Right Sidebar
    */
    function catchkathmandu_header_right() {

    /* A sidebar in the Header Right
    */
    get_sidebar( ‘header-right’ );

    }
    ========================================

    To exemplify my aim:
    In my webpage “http://www.ankaratercumeofisi.com”, I am trying to add email-phone and address text as an html next to the logo and “Ankara Tercume Ofisi”.

    Best regards,

    #108968
    Leslie Bigos
    Participant

    Why don’t you add a TEXT Widget into the header (right) and not mess with coding? You can put clickable links, etc. into the header with the TEXT Widget.

    #108975
    Pratik
    Participant

    Hi @infoyed,

    What @bigoslesli said is correct. Instead of adding custom code, just use Text Widget and add contents in Header Right Sidebar.

    #109004
    INFOYED
    Participant

    Great, thanks @bigoslesli and @Pratik! I did not think I could add a text by simply adding “text” to the “header right sidebar” in the widgets section.

    Right now I want to change its left margin as it is too narrow. The line corresponding the right sidebar text:
    <div id="header-right" class="header-sidebar widget-area">

    Best regards,

    #109005
    Pratik
    Participant

    Hi @infoyed,

    Do you mean to set phone icon and number in same line? if so, do following:
    1. Change your text widget content to following:

    
    <img src="http://www.ankaratercumeofisi.com/wp-content/uploads/2017/02/phone.png" width="20" height="20">
    <strong> 0 (312) 4192098-99 </strong>
    

    2. Add following CSS code in Appearance=> Customize=> Additional CSS box:

    
    .header-sidebar.widget-area {
        width: 400px;
    }
    
    #header-right img {
        display: inline-block;
        vertical-align: middle;
    }
    

    Let me know how it goes.

    Regards,
    Pratik

    #109082
    INFOYED
    Participant

    It works well. Thank you very much @Pratik!

    Have a nice day,

    #109091
    Pratik
    Participant

    Hi @infoyed,

    Thank you for the apprecciation.

    Regards,
    Pratik

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘header right sidebar – text insert instead of primary menu’ is closed to new replies.