You would need to use a hook, but there’s no standard hook after the header, so one would need to be provided in the theme. But then your plugin would only support that particular theme. An alternative would to do use JavaScript, but you would need to know the markup of the theme, which also isn’t standard.
The best you can likely do is include a function in your plugin and provide instructions to site owners telling them to add it to their theme.
Related Posts:
- WP 3.3 How to Add Menu Items to the Admin Bar?
- Unit tests – Dealing with dependencies
- Changing Plugin Load Order
- Should I create a theme or a plugin?
- How should you hook a session_start() when authoring a plugin?
- How to sync with plugins update after I have done manual optimizations?
- How to retrieve a value via get_option when the option_value is stored in a multi-dimensional array?
- How to change wordpress post title?
- Add Admin Menu Inside Construct or Init
- How to create a plugin that only operates on the home page?
- Adding callback function for wp_ajax_ has no effect
- How to properly modify get_userdata in plugin to get roles to update in database
- How to create thumbnail of different files?
- Admin-ajax.php appending a status code to ajax response
- Create a plugin to change the action to which a function is hooked
- comment_email hook doesn’t seem to work for comment editor field
- Why is the reset password key missing in the reset password email?
- Paging on a future post loop?
- How to pass custom options from widget form to widget update callback?
- How can I add a field to make link nofollow to the WordPress Link Inspector Window?
- Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
- WordPress admin deleted user details not removed in database. How to delete WordPress Users from Database
- How to show large image in checkout page using WP Ecommerce plugin [closed]
- Why do I need to check if wp_nonce_field() exists before using it
- settings_fields() doesn’t work for other roles except admin
- edit_{$taxonomy} | Hook
- Worpdress cannot create directory
- Subscribe to author?
- how to make custom bulk actions for a WP_List_Table (core class)
- Get name and email of current unregistered user, who has recently submitted name and email in comment form?
- How to associate an existing user to a site in a multisite setup programmatically
- Changing upload dir in a plugin regardless of post type
- Set page template programaticlly in plugin
- Auto save permalink setting page with the plugin activation
- creating custom function to log actions in plugin
- Alter post object before display
- How to use output buffering in WordPress hooked functions?
- Howto: Use Custom Post Types as Submenu Items in Admin
- Show custom data instead of 404
- How to localize admin.php only once
- What’s the right way to instantiate new blocks and/or the plugin itself in toto when using wppb architecture?
- How can I get a list of CPT inside a plugin file?
- Creating a custom Gutenberg block with columns
- Serve text/html from wp-json API via WPEngine, headers not being set properly
- wp_schedule_event seems to be being added twice
- Add a new confirmation page before saving
- What happens when two or more plugins use the same hook?
- Plugin is not generating title tags on any pages or posts
- Plugin Development/ Stop CSS clashes.
- Adding columns to core tables
- Add Link Category on Activation?
- How to query children by post name/slug
- Add child pages to submenu automatically
- Creating multiple wp_editer() text fields in for loop — the text/visual switch only works for first editor
- Custom Stylesheet instead of Inline CSS for WordPress Customizer API Overrides
- Create page (not the post type) dynamically
- Translate javascript with WordPress built-in localization API for static strings
- Updating transient value frequently
- AJAX button with success callback. (Titan Framework)
- Information on plugin adding text when a post, page, or other such is displayed
- How to add a route?
- Plugin’s total number of users
- How to edit wp-signup.php content using plugin
- Setting post_id for single.php based on URL without a redirect
- using admin functions on frontend
- Javascript Function Called Too Early in PHP Script
- WordPress: redirecting to the form page after form submission to admin-post.php
- Auto hyper link text matching slugs/pages
- Action / Hook when a new plugin is added
- product-attribute-slug-is-too-long-28-characters-max
- Custom plugin & calling REST api of wordpress instance the plugins is running on
- Add variables from rewrite rules to query var
- Show list of categories that has posts with different taxonomies
- “add to cart” links css class “ajax_add_to_cart” doesn’t show in woocommerce in widget sidebar
- How do I specify where to save the debug.log?
- What is the source of the $post_id in a hook argument?
- WordPress Fatal error: Uncaught Error: Call to undefined function dbDelta()
- WordPress custom url without using any of the custom tags given
- How to call a plugin function from a page
- Code for cron to delete posts that contain specific expression (e.g. “unable to fetch” every 30 minutes
- If user is logged-in display/hide widgets ( siteorigine) [closed]
- Use content filter on the post that is password-protected
- foreach argument to get specific file types getting too many returns
- How to fetch the post content from the wordpress editor before it can be saved(published)?
- pull data from wordpress database
- How does one set cookies in WordPress without getting the ‘headers not sent’ error? within WP
- Object Oriented plugin, add action and variables
- Filter the_content() to add custom figure tags
- Glyphicons Dont Show in WordPress Plugin Only
- Change the search results header from plugin
- Installing plugins on installation/activation
- Tracing dashboard publish settings from input form in WordPress
- Post data in wp-admin to external database
- Add query string variables to all hyperlinks URL matching a specified domain
- Virtual Page with Registration form
- Is there such a thing as a WordPress console?
- Images not displaying on live server
- redirect word-press page with page values
- Loading jQuery library from WordPress admin
- Forcing the Uninstall Hook to fail