Plugin- How to Insert Html&JS code in specific Page and specific Div
-
I have some Html& js code relating to this dropbox button by WordPress plugin 1- I want to insert the button in a specifc page for example I have sample page and Sec Page I want to specifiy the page because it’s in all the pages
2- When I install the plugin always appears in the beginning of the website so How to make it in a spcific div for example in the page I’ll select
function hook_html() { ?> <script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="XXXXXXX"></script> <div id="dropboxContainer">hellodrooppp</div> <script type="text/javascript"> var button = Dropbox.createChooseButton(options); document.getElementById("dropboxContainer").appendChild(button); </script> } add_action('wp_head', 'hook_html');
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Plugin- How to Insert Html&JS code in specific Page and specific Div’ is closed to new replies.