Your best bet is to use the the_content
filter hook and add your content to the post
“on the fly” for ex:
add_filter('the_content','add_my_extra_content');
function add_my_extra_content($content){
$my_extra = "<h5>this is the extra content</h5>';
//add before post content
// return $my_extra.$content;
//add after post content
return $content.$my_extra.;
}
Related Posts:
- Add custom TinyMCE 4 Button, Usable since WordPress 3.9-beta1
- How to store username and password to API in wordpress option DB?
- Which hook should be used to add an action containing a redirect?
- Is it worth checking if class_exists when developing a plugin and how to do it?
- Default table collation on plugin activation?
- the_content after all shortcodes are parsed
- How to auto-upgrade my plugin?
- How do I resolve Notice: Undefined offset: 0 in /wp-includes/capabilities.php on line 1145
- Category listing with thumbnail and description on home page
- How can the tinyMCE dom be manipulated (offical API does not seem to work)?
- Pass javascript result to shortcode executer function
- URLs of plugin resources?
- anything like add_meta_box for categories?
- Can we create a category list page in WordPress?
- How to include class from addon after to be sure one class exists in the main plugin?
- Developing a plug-in to charge for
- WordPress: After Gutenberg plugin migration to block.json the localization/ translations with PolyGlot in JavaScript does not work anymore
- What is the Difference between directly call a function and call a function using add_action?
- What is better way to use Bootstrap inside admin panel?
- Updating my plugin without releasing a new version
- Is it possible to check is loaded language files correctly with WordPress plugin?
- 404 errors after plugin options update and category base change
- Default category got deleted. How to get it back as ID=1?
- How to determine, from plugin script, if active theme has The Post Title
- What allows a template file from plugin to be copied in child theme and overridden?
- add_filter : Passing an array instead of the callback function?
- creating custom archive template within plugin for custom post type using archive_template filter
- Advice on plugin structure
- Using wp_parse_args to set up Plugin Default Settings
- how to add Jquery script to one page?
- Problem with parameters in url and pagination
- get_posts() not working when accessing with a custom user role
- Trying to understand order and frequency of action hooks firing
- Where can i find wordpress auto update code flows?
- Create & Save multiple Meta-boxes
- Are there any scripts, classes, and/or functions built-in to WP for a plugin to export/import its saved data from wp_options?
- Issue with querying
- how to search users by ajax live search
- What is the proper method of using global $post?
- Is this best practice for Dynamically adding items to WordPress menus?
- There is a problem in the gutenberg block I developed. Problem is with withInstanceId
- Detect front-end pages only in init hook
- best way to make a WordPresss multisite that is secure but at the same time supporting my plugin development efforts
- How to change title tag at page after loaded post?
- How to get post content by get_posts function?
- Getting following web services error after activating the Rewards Plugin
- WordPress custom taxonomy check box to dropdown
- Creating Admin Plugin – Content of a page is displayed at global scope as well
- How to remove plugin-specific custom taxonomy terms when plugin is uninstalled?
- How to modify files inside wp-includes directory in wordpress
- Fatal error: Call to a member function get_page_permastruct() on a non-object
- Naming conventions when using (PHP5) namespaces?
- add_submenu_page hooked function must explicitly check user capabilities – why?
- How to apply style_loader_src filter with exclusion of a specific file?
- Which is the better way to store images for the plugin?
- Issue on Checkbox with Custom Option Page
- Mixing l18n string from my plugin with WordPress’ translations
- Minimum Widget Width for Plugin Development
- Should I use wp-content/cache or [PLUGIN_DIR]/cache?
- configuration of .htaccess for add_rewrite_rule to make sense
- Restrict certain actions to plugin-specific admin menu pages only
- How to get post meta in functions?
- Adding tables to dashboard pages programmatically?
- Plugin access to average users not only admin
- how to add custom fields into new & update post page?
- Custom Endpoint – Does it possible to use PUT method with WP API Rest?
- List all user post API endpoint
- Rewrite not working since upgrade to 5.9
- Condition to check previous next article post title
- How to display plugin with javascript using markup of the theme?
- Can display plugin without shortcode?
- ACF Field value in wordpress login message filter
- How to prevent wp_insert_post from creating a new post every second?
- Hook for validating and rejecting frontend image upload
- Plugin removes itself if mistake made during edit
- Using meta_key & meta_value in add_rewrite_rule
- Multisite and the JSON REST API: How to?
- Can’t create a blank template
- Custom Registration Form and Passwords
- Looping single post in a theme
- WP Ajax on page load not working on bluehost but was working on Godaddy
- Fullwidth slider using background image Flexslider WordPress
- Is there a way to tell if a shorcode’s handler is being run before or after the content formatting filter?
- How to create an embedded code for wordpress shortcode?
- How can I send an id over the url?
- grouping my widgets wordpress
- Creating custom Insert Media page
- Get fields of a widget
- How to add additional field in a table row after creating a table?
- WordPress plugin tables become corrupt
- Initialize class inside plugin
- How can i call from custom fields to the category editor?
- “Print to printer” functionality in a plugin
- How do you filter get_media_items by mime type in a custom media upload tab?
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- Which subset of html does WordPress support?
- How to set init for maximum script execution, memory limit and max files upload in wordpress
- Trying to build a plugin – Cannot modify header information
- Is it smart to require_once wp-admin/includes/plugin.php when you need only one function from it
- multiple record insert creating many duplicate records