-
AuthorPosts
-
September 10, 2018 at 6:42 pm #1007998
Hey,
Where do I add this code?
<div data-gyg-partner-id=”2065C5D” data-gyg-number-of-items=”6″ data-gyg-currency=”EUR” data-gyg-locale-code=”en-US” data-gyg-id=”code-example” data-gyg-q=”Paris” data-gyg-widget=”activites” data-gyg-href=”https://widget.getyourguide.com/2065C5D/activities.frame”></div>
It says:
Dont forget to include widget.js once per page, right before the closing </body> tagThanks
Charlotte
http://www.airlinestaffrates.com/September 10, 2018 at 6:45 pm #1008001Hey Charlotte,
You can add into footer.php right before the closing body tag.
Best regards,
Jordan ShannonSeptember 11, 2018 at 9:32 am #1008282Hi Jordan
But I don’t see the Footer.php file inte Child theme editor?
Best regards
CharlotteSeptember 11, 2018 at 10:06 am #1008296Hi,
You can copy the footer.php to the child theme folder and then add the code to it or you can use the wp_footer hook to include custom code like:
add_action('wp_footer', 'avia_custom_footer_code'); function avia_custom_footer_code(){ ?> <div data-gyg-partner-id="2065C5D" data-gyg-number-of-items="6" data-gyg-currency="EUR" data-gyg-locale-code="en-US" data-gyg-id="code-example" data-gyg-q="Paris" data-gyg-widget="activites" data-gyg-href="https://widget.getyourguide.com/2065C5D/activities.frame"></div> <?php }
You can add this code to the child theme functions.php.
Best regards,
PeterSeptember 11, 2018 at 10:10 am #1008299Ok, so you mean I can add it to the Child theme functions.php and then I don’t need to add it to footer.php?
September 11, 2018 at 10:23 am #1008304Hi,
Yes exactly. You can add the code to function.php or you can modify the footer.php template.
Best regards,
PeterSeptember 11, 2018 at 10:29 am #1008307I get this reply when I try to add the code to the funtions.php file
Scrape nonce check failed. Please try again.
September 11, 2018 at 11:10 am #1008321Hi,
Seems like a somewhat common error for some in 4.9:
https://wordpress.org/support/topic/unable-to-edit-theme-in-editor-after-wordpress-4-9-update/
https://wordpress.org/support/topic/scrape-nonce-check-failed-please-try-again/I’d recommend to use ftp to download the child theme functions.php, then modify it and use ftp to upload it again.
Kind regards,
PeterSeptember 12, 2018 at 6:46 am #1008727Aha, ok, thanks :)
-
AuthorPosts
- You must be logged in to reply to this topic.