Pull from the provided answer back in 2012 and testing with the 2021 theme it works as intended.
function addTable( $content ) {
ob_start();
echo '<table><tbody><tr><td>Example html here</td></tr></tbody></table>';
$table = ob_get_clean();
$content .= $table;
return $content;
}
add_filter( 'the_content', "addTable", 20 );
Related Posts:
- Edit plugin without hooks in functions.php
- Pass A Value From Outside To A Plugin Variable
- Failed to invoke other hook from the init hook
- How can I filter blog name?
- why does the add_action(‘the_content’) overwrite my page
- Determine plugin name from within plugin_action_links filter
- merging an array to an existing array using add_filter
- Get Time Taken By Each Action Hook in WordPress
- Proper way to replace the_content only for pages created by custom plugin
- Can I add content before post content without using the_content filter
- WordPress Add advertising ads befor and after content with periority [closed]
- Passing a parameter to filter and action functions
- Get a list of all registered actions
- How can I edit post data before it is saved?
- How to only hook on Single.php after content?
- Customizing subject in comment notification e-mails
- How to save the values of checkbox to the register setting?
- Using add_filter inside another class
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- Good tools for locating hooks in a wordpress page/admin interface/blog post?
- Hide WordPress Plugin Deactivation Links
- Built in admin ajax hooks?
- Does the ‘nav_menu_css_class’ filter accept 2 or 3 arguments?
- Adding dynamic section to WordPress
- do_action and hook methods
- Is it possible to add an action to the currently running action?
- How to filter content post only on save
- Filter or action hook to insert content on admin pages before tag
- plugin_action_links_{$plugin_file} hook not in the main plugin file
- OOP: Display warning and deactivate the plugin if PHP version is less than 5.4
- Add Fields with Sub-Fields to WP Job Manager
- How to prevent action in ajax request, when in admin side?
- template_redirect not being called when using ajax
- Placement of Code in Plugin for hooking `save_post`
- What are the benefit in adding hook in the init() hook?
- Reposition Woocommerce Message
- How to correctly detect accessing wp-content/uploads?
- How to call function at the bottom of post using plugin?
- How to pull code snippet from functionality plugin?
- How do action and filter hooks understand where to look for the core function that we hooked our function to them
- Any hook for pre-plugin-update -either bulk or single plugin update
- Creating a plugin to sanitize comment and the url field before display only
- How to find the origin of a file upload from within wp_handle_upload?
- How to get all of the activate_plugin action parameters?
- Modifying the comments section through a plugin regardless of theme
- Using a post-signup hook to get user details
- White page by using filter template_include
- Passing an array from shortcode-function to filter-function
- Are functions in main plugin file called before function bound to register_activation_hook runs?
- Filtering WooCommerce Orders by Category
- Output content to the_content before a plugin does
- do_action() hook into load-(page)
- Howto check version of another plugin and then add a submenu page to it
- How to change the name of the “edit my profile” link in the WordPress admin backend
- add_filter doesn’t work
- Template filter for custom taxonomy terms
- Check if variable is set in filter
- remove_action not removing add_action from constructor
- Save user total active time after login in wordpress [closed]
- wp_loaded with static Singleton
- is it possible to hook every page style?
- Add a function call after content automatically?
- what is the point of telling add_filter how many parameters you want passed to the function?
- How to add filter for wordpress plugin?
- How to use add_action for multiple instances of the same class
- How to hook into action/filter call
- Quick press publish post hook
- using wp_footer hook in a plugin
- Filters on the_content with plugins, pages and shortcode
- How to automatically activate users after registration without activation email?
- Creating a plugin that will display text on every page
- Want to create custom design of progress indicator in wpforms
- Activation flow of a plugin in a multisite environment
- admin_post hook not firing function inside class
- Unpublished Pages Failing To Appear On Custom Path
- When/where would want to attach other classes to the base class in a WordPress plugin?
- Plugin function in child theme
- Use action, filter, or hook to append HTML to WordPress plugin function
- Passing function into add_action always returns the first argument
- Hook to display element as product on category page
- Remove action added in plugin class from theme
- Using multi-dimensional array with filter
- WordPress Boilerplate Plugin doesn’t see callback functions for add_settings_field and add_settings_section
- plugin not hooking to my custom hook
- Why can’t I shove an instance of a class into a variable from a do_action hook?
- Passing a parameter to filter and action functions
- How Can the_post Be Hooked Like the_content and the_excerpt?
- shortcode which is introduced into entry the blog, and appears in side bar
- Plugin hook breaks new WP 4.0 media library grid view?
- Plugin Hook: Get posts
- Display_rows() and column_cb() strange behaviour
- add query string to all pages after user logged in
- How wordpress plugin hooks works? [duplicate]
- Post curl function save twice using plugin hook function wordpress
- Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ] [closed]
- Which action/filter can i use for a Member Plugin [closed]
- WordPress Hooks : Where to place callbacks that repetitively yield the same effect?
- Unable to pass arguments from plugin form to filter hook using ajax, the data is transferring via ajax but unable to pass as arguments in filter hooks
- Suitable hook when creating, updating and deleting posts programmatically
- is_user_logged_in() undefined at shutdown in plugin context