Hooks are going to be your best friend here.
You can filter post content by using the the_content filter for example:
add_filter('the_content', 'wse_174099_append_to_content');
function wse_174099_append_to_content( $content ) {
//get your data
$custom_items = get_option( 'option_name' );
$content .= wpautop( $custom_items );
//always return when using a filter
return $content;
}
You can hook into the footer of the site by hooking into the wp_footer action:
add_action('wp_footer', 'your_function');
function your_function() {
$custom_items = get_option( 'option_name' );
echo $custom_items;
}
You could also look at the get_header and get_footer actions. The only issue is that you can’t control where the theme calls the header and footer files in – it may be a bad spot to output your code.
Hope this helps!
Related Posts:
- How can I limit functionality in one version of a plugin?
- How wordpress plugin hooks works? [duplicate]
- How to structure a plugin
- How can I edit post data before it is saved?
- is_plugin_active function doesn’t exist
- Custom pages with plugin
- Where is the best place to use add_filter
- WordPress Plugin Development In MVC Architecture, How?
- Is it a good idea to edit an already existing plugin to add more functionality?
- Checking if an attribute exists in a shortcode
- When can you get current page ID and initialize hooks right after?
- Show Similar Post Titles ( Similar to Stack Exchange )
- How do I unlock a post programmatically?
- Create page when plugin is activated
- Using the ‘draft_to_publish’ hook (post status transition)
- Which functions in theme or plugin load first
- How to show custom message once on plugin activation?
- Shortcode display outside the div
- Add CSS animation as Preloader to WordPress
- How to list the Hooks and order of execution in current loading page? [duplicate]
- How to load a new template page according to a particular URL?
- WordPress network: set themes and plugins for new blog
- Updating post meta for custom post types
- Failed to invoke other hook from the init hook
- REST-API: extend media-endpoint
- How to call bind function in wordpress actions or hooks
- template_redirect not being called when using ajax
- add action wp_head not working
- add_action in functions.php, do_action in plugin?
- Is there a way to alter the order in which the plugins appear in the page?
- add action for displaying posts using a shortcode
- ‘wp_login’ action hook not working with wp-login.php file
- How to use get_theme_mod in gutenberg editor wordpress?
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- WordPress plugin – Error “Plugin generate 2890 characters of unexpected output when activated”
- My plugin wants to update another plugin
- Input with spaces in Shortcode attributes overwritten by defaults
- Edit Yoast SEO breadcrumbs output [closed]
- How would I go about creating a user ranked post popularity page?
- Disable woocommerce cookies and delete cart data automatically
- How to check current user before all actions and filters?
- Best way to maintain and update 3rd-party WP plugin when developer is unresponsive?
- Are functions in main plugin file called before function bound to register_activation_hook runs?
- Custom plugin init action causing general slowness
- Customization API for plugin development
- Fromcraft Plugin On click submit button [closed]
- How to redirect users to their profile after they successfully edit their profile
- Inject HTML meta tag inside wordpress tag using add_shortcode
- Redirect to another page using contact form 7? [closed]
- How to pass variables to a function argument using add_action [duplicate]
- a weird attribute on every html tag
- Submit Form data to another page via Ajax (WordPress Way)
- Does using `add_action( ‘init’…` cause performance issues?
- Plugin Development – Functions or Hooks?
- Hook for page Request?
- Loop in elementor custom widget not working
- Advanced WordPress plugin activation detection
- Calling a save function from a “submit” button
- Delete data from custom table when deleting a post
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Custom Module, Extending WP with a Plugin?
- unregister a sidebar widget
- Custom Post Type, Custom Columns List
- Check if theme supports sidebar
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- The function called on the wp head hook becomes null
- Rename a folder via HTML POST request
- working code, not working – Plugin Dev
- Cannot view Custom Post Type no matter what I try
- Create survey that redirects to sidebar menu customized to answers
- Nested Actions and Filters
- Custom wp_list_tables redirect on specfic page
- Passing function into add_action always returns the first argument
- Paid Membership Pro displaying a user name in PHP
- Load my Inline js footer area
- Remove action added in plugin class from theme
- Woocommerce list variations that are added already to cart in Single Product
- echo plugin results on pages
- How to use custom footer template in a site-plugin?
- Creating Nested custom fields
- Confusing problem with displaying message recipient metadata
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- Custom pages with plugin
- Plugin Hook: Get posts
- Multiselect value in wp_query
- show Visual form builder in the front end
- Is it possible to cancel a post status transition?
- Get page type to display content
- WordPress Code Access to Restricted Content without Registration
- How to add image for custom taxonomy
- What can I do to customize a widget provided with this plugin? from where have I to start?
- WordPress Customise
- Why haven’t I see plugins using get_file_data to handle retrieving plugin version?
- How can I properly sanitize the update_option in WordPress?
- Create Custom Coupon Type
- Take Elementor For Email FIeld Check if user is registered. IF not registered then register on woocommerece
- WordPress isn’t sending welcome email with the password reset
- add_action() not working for admin
- I have created a custom plugin. After activation it creating page but i am not getting how to add another php file at page content?
- Need to add custom cart item data