Jump to content
Sign in to follow this  
millerwhite

Second set of social icons in footer (Trying to use hooks)

Recommended Posts

millerwhite

I'm having a bit of an issue with trying to use a hook to place a second set of the social media icons in the footer. I'm definitely no php expert, but have looked at the docs enough that I've been able to successfully implement hooks on several occasions. For instance, when following the example on the child theming page that is always linked here, I was able to actually get two search bars before removing the unwanted one. So, I'm trying to do something similar with the social media icons. I'd like to keep the ones that are currently in the header where they are, but also add the set in the footer. I think I want to start off trying to place them with the "pagelines_before_footer" hook, and styling it from there to get it placed where I want. The issue I'm having is that I'm not quite sure what to enter in the functions file (using the child theme) after declaring the function name (

function footer_social(){?>
). When adding / moving the search bar before, it was a simple
<?php get_search_form();?>
, but I can't seem to find what it would be for placing the icons in a new area using a hook. I've currently just placed the Social Media Widget plugin in the footer, and that works fine, but the icons are bigger and not styled in quite the same way that the PageLines icons are, and if possible, I'd like for those to be consistent. For reference, here is what I've tried already, to no avail:
	// add_action('hook_name','function name');
	add_action('pagelines_after_footer','footer_social');
	
	// function name
	function footer_social(){?>
	
	
<?php if(pagelines('rsslink')):?> <?php endif;?> <?php if(VPRO):?> <?php pagelines_register_hook( 'pagelines_branding_icons_start', 'branding' ); // Hook ?> <?php if(pagelines_option('twitterlink')):?> <?php endif;?> <?php if(pagelines_option('facebooklink')):?> <?php endif;?> <?php if(pagelines_option('linkedinlink')):?> <?php endif;?> <?php if(pagelines_option('youtubelink')):?> <?php endif;?> <?php pagelines_register_hook( 'pagelines_branding_icons_end', 'branding' ); // Hook ?> <?php endif;?>
<?php }[/code]

This may not even really be possible, I don't know. And if it's not, I'll just make do with the social media widget. But, thought I'd at least post it here and see if there was anything that could be done. Any help is greatly appreciated. Thanks!

Share this post


Link to post
Share on other sites
Jenny
I'm not sure if you found the right hook or not, but have you checked out the Action Map plugin from the Store to help you find the right one?

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
millerwhite
Hmm, no I haven't tried that one yet. I'll check that out. In the meantime, I just used the custom icons feature of the social media widget plugin, and just duplicated the icons used in PageLines. Thank you!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×