Hello, I’m creating a Facebook Tab which will show one of my page.
I should insert in the body of the page some <script> ..>/script> code, just after the >body> tag, and only in the page called by Facebook.
Can I ask your kind help in directing me in the right direction ? I can I accomplish the task ?
Thanks a lot
Kind regards
Antonio
Hey lombrano!
Thank you for using Enfold.
Please use this on functions.php:
function add_body_script(){
?>
<script>
</script>
<?php
}
add_action('ava_after_main_container', 'add_body_script', 10);
Use wordpress conditional if you want to show it on a specific page. http://codex.wordpress.org/Function_Reference/is_page
Cheers!
Ismael
Hello Ismael,
sorry for my late answer.
The code works perfectly, thank you !
But … how can I use the is page( ) to put the script only on one specific page ? Where do I put the is page code ? Can you please help me modifying the code you suggested ?
Thanks a lot for your help
Antonio
Hi!
Something like this:
function add_body_script(){ if(is_page('PAGE ID/NAME HERE')) {
?>
<script>
</script>
<?php
}
}
add_action('ava_after_main_container', 'add_body_script', 10);
Best regards,
Ismael
Thanks a lot again !
Antonio