Home › Forums › ZA WordPress Theme › Adding social media icons to lateral menu
Tagged: icons in menu
- This topic has 8 replies, 2 voices, and was last updated 10 years, 1 month ago by
SeaTheme.
-
AuthorPosts
-
May 2, 2016 at 2:08 pm #10478
Is there a way to add my social media icons to the bottom of the lateral menu?
I’d like to stack ’em up right on top of the magnifying glass icon.
I’m just wondering if there is a way to do so without hardcoding anything to the menu file.May 3, 2016 at 12:41 am #10480Hi,
There is not way without hardcoding, please try to add the social code into /template/global/header-onside.php
<?php $show_social_medias = ux_get_option('theme_option_show_social'); $social_medias = ux_get_option('theme_option_show_social_medias'); if($show_social_medias && $social_medias && isset($social_medias['icontype'])){ $icon_type = $social_medias['icontype']; ?> <ul class="socialmeida clearfix"> <?php foreach($icon_type as $num => $type){ $icon = $social_medias['icon'][$num]; $url = $social_medias['url'][$num]; $tip = $social_medias['tip'][$num]; $tip_wrap = $tip ? '<span class="socialmeida-text">'.esc_attr($tip).'</span>' : false; $width = (100 / count($icon_type)). '%'; ?> <li class="socialmeida-li"> <a title="<?php echo esc_attr($tip); ?>" href="<?php echo esc_url($url); ?>" class="socialmeida-a"> <?php if($type == 'user'){ echo '<img src="' .esc_url($icon). '" alt="' .esc_attr($tip). '" /> '; } else { if($icon) { echo '<span class="' .esc_attr($icon). '"></span> '; } } ?> </a> </li> <?php } ?> </ul> <?php } ?>May 3, 2016 at 4:52 pm #10496Hi,
Where exactly in the “header-onside.php”?
I’ve just added the code you provided but it’s not working for me. I still can’t see the social media icons in my lateral menu bar.May 3, 2016 at 11:57 pm #10497Login FTP, go to: /wp-content/themes/za/template/global/header-onside.php
May 4, 2016 at 5:48 pm #10499Looks like I’m modifying the right file but no matter what I do, when I refresh my site looks like no modifications were made in the “header-onside.php” file.
I even tried clearing all the code and saving the file as empty but it still displays perfectly in the browser, and yes, I cleared my web browser’s cache before refreshing the site.
Any thoughts on this?
May 5, 2016 at 1:45 am #10504I even tried clearing all the code and saving the file as empty but it still displays perfectly in the browser
1. It seems that you didn’t find right file. Please double check it
2. is there some cache plugin (like w3c total cache…) installed? please deactivate it.May 5, 2016 at 1:46 am #10505This reply has been marked as private.May 5, 2016 at 5:25 pm #10508Hi,
Turns out I was modifying the right file but in a non-active copy of the template folder.
So, no wonder why I never managed to make a change in the menu side bar.Everything’s looking just fine now.
Here’s a pic to show you what I finally accomplished thanks to your help.Thanks again, take care 😀
May 6, 2016 at 2:21 am #10513Good for you.
You are welcome 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.
