- This topic has 6 replies, 3 voices, and was last updated 7 years, 7 months ago by Pratik.
-
AuthorPosts
-
February 6, 2017 at 7:47 pm #108938INFOYEDParticipant
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,
February 7, 2017 at 6:32 am #108968Leslie BigosParticipantWhy 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.
February 7, 2017 at 10:12 am #108975PratikParticipantHi @infoyed,
What @bigoslesli said is correct. Instead of adding custom code, just use Text Widget and add contents in Header Right Sidebar.
February 7, 2017 at 2:29 pm #109004INFOYEDParticipantGreat, 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,
February 7, 2017 at 2:51 pm #109005PratikParticipantHi @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,
PratikFebruary 8, 2017 at 11:53 am #109082February 8, 2017 at 12:33 pm #109091 -
AuthorPosts
- The topic ‘header right sidebar – text insert instead of primary menu’ is closed to new replies.