Community Forums › Forums › General Discussion › Customize "Enable extras on right side"
Tagged: navigation extras
This topic contains 6 replies, has 4 voices, and was last updated by lauraM 4 months, 3 weeks ago.
-
AuthorPosts
-
December 27, 2012 at 4:03 pm #7751
I would like to display a phone number ONLY using “enable extras on right side”
But there are only 4 choices currently to choose from.
Pls help
Thank youDecember 27, 2012 at 5:20 pm #7783Laura – can you please post a link to your site (or let us know what theme you are using). Thanks!
Susan @ Graphically Designing I’d love to customize your website! I tweet!
I’ve taken up the challenge! – help me answer some of the unanswered postsDecember 27, 2012 at 5:33 pm #7790This is a little more involved than you might think, but Bill Erickson has a nice tutorial on customizing this area.
Jennifer “Hermione” Baumann | Recommended StudioPress Developer
Dream Whisper Designs | Themessence | @dreamwhisper | If I’ve helped, like me on FacebookDecember 27, 2012 at 5:42 pm #7792December 27, 2012 at 6:31 pm #7805I read the tutorial but not sure I understand what I just read.
Can you tell me what code I need to have the code render a phone number?
I no issue editing the code in the functions.php
December 27, 2012 at 9:51 pm #7836Hello lauraM,
Try this in functions.php:
add_filter( 'genesis_nav_items', 'be_follow_icons', 25, 2 );
add_filter( 'wp_nav_menu_items', 'be_follow_icons', 25, 2 );
/**
* Follow Icons in Menu
* @author Travis Smith
* @author Bill Erickson
* @link http://www.billerickson.net/genesis-wordpress-nav-menu-content/
*
* @param string $menu HTML menu output.
* @param array $args Array of nav menu arguments.
* @return string HTML menu output.
*/
function be_follow_icons($menu, $args) {
$args = (array)$args;
if ( 'primary' !== $args['theme_location'] ) // Change this to the nav menu location
return $menu;
// Change this below. In case you do not know the text is written for translation.
// If you don't need translation, you can use this: $phone = '<li id="phone">Call us: 999-999-9999</li>';
$phone = '<li id="phone">' . __( 'Call us', 'child-domain' ) . ': 999-999-9999</li>';
return $menu . $phone;
}
December 28, 2012 at 3:16 pm #8000Thank you so much, the code did indeed solve one part of this issue.
The only other issue I have is the code renders everything just fine on my monitor, however when I switch over to an Iphone or ipad it does not carry the CSS define in the style.css file I have set up.
The CSS I set up was:
#nav li.phone {
padding-top: 7px;
padding-left:50px;
color: #cc9966;
font-size: 20px;}Like I said it looks great on my monitor but take a look on an iphone and you will see it has dropped and is not in-line with the nav bar and also included a vertical line not shown on the monitor as well.
Any ideas??
-
AuthorPosts
You must be logged in to reply to this topic.