This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

adding social media icons in layout

  • Creator
    Topic
  • #3044
    michell610
    Participant

    Hi,
    I wanted to add social media option to Layout > Header I have this snippet:

    // Add social media option to Layout > Header
    $social_media = array( 
    	'name' 		=> 'Social Media Buttons',
    	'desc' 		=> 'Description for your client...',
    	'id' 		=> 'social_media', // Keep this ID to work with themeblvd_contact_form() !
    	'type' 		=> 'social_media' // Special option type to bring in social icon selections.
    );
    themeblvd_add_option( 'layout', 'header', 'social_media', $social_media );
    
    
    // insert this code in the function where you want to display
    // the social media widgets:
    // echo themeblvd_contact_bar(); for example:
    
    function social_icons(){	
    	echo themeblvd_contact_bar();	
    }
    add_action('themeblvd_header_addon','social_icons');

    I am a newbe, where do I put this. I am using the child stretch theme
    Thanks,
    michell

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #3050
    Jason Bobich
    Keymaster

    Hello Michell,

    These kinds of things would go in the functions.php of your Child theme.

    #3071
    michell610
    Participant

    Thanks Jason,
    would these go before the require_once command or after the function my_scripts command?
    Michell

    #3082
    askwpgirl
    Participant

    Hi Mitchell,

    I placed my code AFTER the

    require_once( get_template_directory() . '/framework/themeblvd.php' );

    and it worked perfectly.

    Angela

    #3083
    askwpgirl
    Participant

    I should add, that I placed it after both the require_once and the my scripts loading, as I usually place all my stuff after those things anyway, unless I modifying default display.php items, in which case, those go before the require_once line.

    #3135
    michell610
    Participant

    Ok, I got it to work except that it shows up on the left side I want it on the right. I set it to display:

    function social_icons( ) {
        echo themeblvd_contact_bar( );
    }
    add_action('themeblvd_header_addon', 'social_icons');

    How can I make it show up on the right in line with the title?

    Thanks,
    Michell

    #3155
    Jason Bobich
    Keymaster

    Ok, I got it to work except that it shows up on the left side I want it on the right.

    So, now you have your HTML markup in the place you want. The next step is to position your custom code with CSS. You could possibly float it the right of the header or position it absolutely.

    For CSS changes, it’s a good idea to use a tool like firebug or Google Chrome’s built-in developer tools to locate them and then put the edits either in your child theme or in the “Custom CSS” option on your theme options page.

    Also, here’s a helpful tutorial on how to use Firebug – http://vimeo.com/20917974. The only thing I’d suggest not doing is actually making edits to the theme’s CSS files, as it shows at the end of that video. However, the video serves as a good introduction to Firebug and how it can be used to find what CSS is effecting certain areas of your site without ever digging around in any files.

    #3183
    michell610
    Participant

    Thanks Jason! worked great!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.