Title: Plugin- How to Insert Html&amp;JS code in specific Page and specific Div
Last modified: June 21, 2022

---

# Plugin- How to Insert Html&JS code in specific Page and specific Div

 *  Resolved [mostafaezzat](https://wordpress.org/support/users/mostafaezzat/)
 * (@mostafaezzat)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/plugin-how-to-insert-htmljs-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');
       ```
   
    -  This topic was modified 3 years, 11 months ago by [mostafaezzat](https://wordpress.org/support/users/mostafaezzat/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Mej de Castro](https://wordpress.org/support/users/mej/)
 * (@mej)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/plugin-how-to-insert-htmljs-code-in-specific-page-and-specific-div/#post-15761031)
 * Hi [@mostafaezzat](https://wordpress.org/support/users/mostafaezzat/)
 * Would you mind sharing the website link to us?
 * Thanks,
    Mej
 *  Plugin Author [Mej de Castro](https://wordpress.org/support/users/mej/)
 * (@mej)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/plugin-how-to-insert-htmljs-code-in-specific-page-and-specific-div/#post-15773509)
 * Hi [@mostafaezzat](https://wordpress.org/support/users/mostafaezzat/)
 * We haven’t heard from you in a while. We hope you managed to resolve the case
   and use the plugin without issues. We will mark the case as resolved now, in 
   case you are still experiencing any difficulties you can always reply here with
   more details on the matter.
 * -mej

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.

 * ![](https://ps.w.org/wp-discussion-board/assets/icon-256x256.gif?rev=2763883)
 * [Discussion Board - WordPress Forum Plugin](https://wordpress.org/plugins/wp-discussion-board/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-discussion-board/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-discussion-board/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-discussion-board/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-discussion-board/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-discussion-board/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Mej de Castro](https://wordpress.org/support/users/mej/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/plugin-how-to-insert-htmljs-code-in-specific-page-and-specific-div/#post-15773509)
 * Status: resolved