Jump to content
Sign in to follow this  
Karoleena Homes

HOOK Trouble

Recommended Posts

Karoleena Homes

Just trying to add my first 'hook' and having some trouble. I updated my base theme functions.php file with the following code and it allowed me to save, but I'm not seeing anything. I'm trying to add an image BEFORE the social icons area in the site branding section.

// Add MODA logo to header before social media icons
	add_action( 'pagelines_branding_icons_start', 'moda_logo');
	
	function moda_logo(){
	?>
	
	<?php}[/code]

Any help or advice would be so appreciated. I'm really stuck and have read almost every post I can find on hooks, watched the video, etc. Thanks, Amanda

Share this post


Link to post
Share on other sites
bryan-hadaway

I think you need to update to: ` // Add MODA logo to header before social media icons add_action( 'pagelines_branding_icons_start', 'moda_logo'); ?> function moda_logo(){ <?php} ` Thanks, Bryan

Share this post


Link to post
Share on other sites
Karoleena Homes

Hi Bryan, Thanks so much for your reply. I just tried that and when I tried to save my functions.php file, I got the following error: Parse error: syntax error, unexpected '}' in /home/karoleen/public_html/wp-content/themes/platformbase/functions.php on line 68 Thanks for any insights you might be able to offer! Best, Amanda

Share this post


Link to post
Share on other sites
Karoleena Homes

I have no idea why this worked but I just replaced the stumbleupon hook that was sampled in the functions.php file with my new code and that worked. Random. Wish I could post a 'why' here but when I tried to add it to the bottom, I kept getting that error message. Thanks!

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  

×