As you want to insert the button on only one/few specific pages you can simply create a shortcode[Reference] and insert it on specific page/pages.
Your code will be something like:
function hook_html(){
//function body
}
add_shortcode( 'dropbox_button', 'hook_html' );
And then just edit the specific pages and add the shortcode [dropbox_button]
to them, you can also choose to add this in any section of the page that you want.
Related Posts:
- Add multiple plugin directories
- What are the differences between WPINC and ABSPATH?
- Where do I put the code snippets I found here or somewhere else on the web?
- Delete WordPress plugin Repository
- Giving Multiple Authors Access to a Plugin’s WP.org Repo
- Add section (add_settings_section) to a custom page (add_submenu_page)
- Creating a default Custom Post Template that a Theme can override
- Load plugin selectively for pages or posts, etc
- Multiple plugins vs combined one
- Can i create two tables at single time while installation of custom plugin?
- WordPress plugin installation error
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- How does WooCommerce display a custom comment_type in Comment Admin?
- Detecting when a custom taxonomy has been changed and display alert?
- Created Widget Not Showing up on Admin Panel
- How to display public user profile with 2 additional fields? (GitHub source code included)
- Action on post publish
- OOP: Display warning and deactivate the plugin if PHP version is less than 5.4
- wp_enqueue_scripts not working inside shortcode
- Handling jQuery Component Collision
- How to make my plugin GDPR compatible?
- Why is the Settings API is not saving my array of options
- Scope for PHP Variables Assigned in functions.php or a plugin
- How to make a custom field as an editor in wordpress?
- Why is an action callback function from an instance of a class always invoking the same function from an instance?
- How to keep users unique id stored in session in addition to IP in WordPress plugin?
- JS Support Ticket – Auto create WP account
- uninstall.php file in Plugin to clean DB
- Save / Show multi line text in metabox
- Python with wordpress plugin
- Passing an array from shortcode-function to filter-function
- WP_Async_Task doesn’t appear to be running asynchronously
- How to delete custom taxonomy terms in plugin’s uninstall.php?
- TinyMCE Styles Dropdown not adding html tags other than span
- add_filter doesn’t work
- How can I insert thousands of Woocommerce products by batch with PHP? [closed]
- What are the Best Practises When Using AJAX in Plugin Development?
- Setup wp_schedule_event within a custom plugin
- Run function on plugin activation before plugin is loaded
- execute function after one completed
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- Can I use register_settings and unregister_setting once the settings page has loaded?
- Plugin function inside custom plugin
- How to Resize the Custom Post Images?
- Why is it important to check for isset and is_array before checking in_array in this example?
- Upload files to the plugin menu
- Class or function wrapper for plugin code
- Licensing a Plugin [closed]
- Add a function call after content automatically?
- Don’t load the theme for a page FROM a plugin EDITED
- WordPress Feed Creator Name Tag Full Name Instead Of First Name
- WordPress plugin with its own “site”/theme
- How to add custom function to pluggable.php
- Ajax request sends url rather than data
- How to displaying Custom image, text and default image logo from Redux Framework option panel
- Scrape key check failed. Please try again
- Add a new category for posts
- How to save Setting pages data to the database?
- Add hook after content without formatting
- User loggedin as Subscriber form not sending
- wc_get_template_part doesnt display the content [duplicate]
- Prevent WordPress from sending set-cookie http header
- admin_post hook not firing function inside class
- Thumbnail image doesn’t show up in Shortcode output
- how to auto random increment for post view
- Fatal error: require_once(): Failed opening required
- How to properly enqueue jQuery knob on WordPress without conflict?
- Woocommerce convert simple products to variations
- WordPress Thickbox Navigation Issue in Gallery
- How to save the option’s new values plus old value without overwrite old one
- Not displaying Woocommerce product page in lightbox
- WordPress Media Uploader : How to add custom button on featured image tab
- Change pricing in Woocommerce based on Category and Product [closed]
- Can we validate data from jquery
- WordPress environment not loading properly
- how can i get records from wp_postmeta table using particular meta_key in database?
- Re-writing MySQl query for execute faster
- Getting error “The package could not be installed. PCLZIP_ERR_BAD_FORMAT ”
- show Visual form builder in the front end
- Building a simple “settings” plugin to change textstrings on the home page
- My wordpress website admin panel loads very slow, what can i do about that? [closed]
- wordpress plugin | short code issue
- WordPress Customise
- Predefine Product Variations for specific custom product type [closed]
- Create plugin with multiple blocks
- Custom wordpress plugin does not save select element
- How to set meta-data for my plugin
- WordPress isn’t sending welcome email with the password reset
- A splash page on landing page
- Inline AJAX script passing variables to PHP
- I’m getting the following error: Fatal error: Uncaught Error: Call to undefined function oil_paint_regeneration() [closed]
- how to code activate/deactive button of custom plugin within backend?
- move setting data from wordpress api to codestar freamwork
- How to access the page without registering in wordpress
- CPT template is not being automatically used single post pages
- How to trigger plugin migration code when plugin updates?
- How to Save Category and Delete Category in same Function
- claim a permalink and all sublinks in plugin
- Vanilla javascript in custom gutenberg block not working
- How to use `$order->get_discount_total()`, avoiding defoult WC decimal rounding?