Jump to content
Sign in to follow this  
create180design

Add Pinterest Icon to Social Media Icons

Recommended Posts

create180design

I would like to add the Pinterest icon to the list of social media icons on the branding header. With your help, I already have a hook for the newsletter sign up. I looked at the code for the hook for the branding but I think there is something missing. Can you please verify that I have the proper code to make this work?

// add_action('hook_name','function name');
	add_action('pagelines_branding_icons_end', 'add_icons_to_branding');
	
	// function name
	function add_icons_to_branding(){
	
	// what the function does??“in this case adds a stumbleupon icon to the header of your theme. The class referenced in the link can be seen in the style.css
	// and is the image from the CSS is placed in the images folder
	?>

I have added the image to my media folder: http://www.wellspringhumanenergy.com/wp-content/uploads/2012/03/Pinterest-icon.jpg But I don't know what to do from here. Any help will be appreciated!

Share this post


Link to post
Share on other sites
catrina
The function requires the piece of HTML code for adding the Pinterest icon itself. For example: [code][/code]

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
create180design
So just to be sure I will write it as this: [code]// add_action('hook_name','function name'); add_action('pagelines_branding_icons_end', 'add_icons_to_branding'); // function name function add_icons_to_branding(){ ; ?> [/code] how will it know to add it to the other icons and have the same spacing? is there anything else that I'm missing? Thanks,

Share this post


Link to post
Share on other sites
Jenny
You need closing and opening php brackets since html isn't processed by php. You also forgot the closing bracket.. and you don't need the end ; or ?>. However, I don't know if you're adding this in the middle of the php file or at the end, but regardless, this is how it should look overall without any extra stuff in there. [code]add_action('pagelines_branding_icons_end', 'add_icons_to_branding'); function add_icons_to_branding() { ?> // you can add more icons here

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
create180design
Thank you. I was going to add it to the base theme functions.php file Am I supposed to add this somewhere else??

Share this post


Link to post
Share on other sites
Jenny
That is the correct place. Just put it at the very end of the file.

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
jbekefy
Ok... I tried this and must have messed up a line of code as it has nuked my site. http://ec2-184-169-134-244.us-west-1.compute.amazonaws.com/ So I am in the backend via FTP and can access the WP db and specifically this plug-in and php. Can anyone help me revert the php code back to its original format?

Share this post


Link to post
Share on other sites
Simon
Delete the lines you added.

Share this post


Link to post
Share on other sites
jbekefy
Nevermind I am good answer accepted thank you kindly!

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  

×