Smart App Banner

Hi,

Is there a way for me to add this code`to the header of PRO?

<meta name="apple-itunes-app" content="app-id=1268635700, affiliate-data=myAffiliateData, app-argument=myURL">

Thanks,
Tyler

Hi Tyler,

Please add the following code under functions.php file locates in your child theme:

add_action( 'wp_head', 'add_head_script' );
function add_head_script(){
	?>
	<meta name="apple-itunes-app" content="app-id=1268635700, affiliate-data=myAffiliateData, app-argument=myURL">
	<?php
}

How about on a multi-install where there needs to be different code on each?

Hi @davidayates,

You have to edit the provided code a bit:

add_action( 'wp_head', 'add_head_script' );
function add_head_script(){
		if( is_page(array(123)) ){
	?>
	<meta name="apple-itunes-app" content="app-id=1268635700, affiliate-data=myAffiliateData, app-argument=myURL">
	<?php
		} else if( is_page( array(234) )){
	?>
	<meta name="apple-itunes-app" content="app-id=1268635700, affiliate-data=myAffiliateData, app-argument=myURL">
	<?php
	}
}

Let us know how it goes!

Hello, I keep trying to add this to my site but I get a 403 Error on my website. Can you help?

Hello Joseph,

Please check your php code, syntax or you may have inserted invalid characters. One single quote mistake could lead to a fatal error. Please post the entire contents of your child theme’s functions.php file in your next reply.

Thank you in advance.

I am actually using the snippets plugin for this as it keeps things more organized.

Hey Joseph,

Is the issue resolve already?
If you need anything else we can help you with, don’t hesitate to open another thread.

Regards.

Hello RueNel,

Actually I am still getting the error. Not sure why.

Hey Joseph,

I tried the codes provided in this thread and I am not getting an error in my installation. In case you are still having an issue on the site when you use the codes, please post a new thread and please provide us with the admin access to your site in a Secure Note:

It was apparently Part of the iThemes Security Plugin I have. It has an option to disable file editor in wordpress. I turned it off and purged the cache and did not have an issue. My apologies.

Hey Joseph,

We are just glad that you have figured it out a way to correct the said issue.
Thanks for letting us know!

Best Regards.