the_content will return the whole content of the post and not particular part. If you want to access your particular part, then you can go for shortcode.
For eg, if you have content like this in your post
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry’s [mycustomtextpart]
standard dummy text ever since the 1500s, when an unknown printer took
a galley of type and scrambled it to make a type specimen book. It has
Then use do_shortcode function to make changes in the [mycustomtextpart] section. Refer.
Related Posts:
- Difference Between Filter and Action Hooks?
- How to create an API for my plugin?
- How do you use the plugin boilerplate loader class to hook actions and filters?
- add_filter OO with parameters
- How do I Make a Theme “plugin-ready”?
- Actions or filters fired when data is saved in a custom table
- What’s the difference between hooks, filters and actions? [duplicate]
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- Is it possible to create an action hook using do_action() within add_action()?
- How to add custom content under plugin row in WordPress admin plugin list?
- Define a function outside a class and call the function using action or filter hook
- Woocommerce – Hide a Column in Cart Table
- Namespaced action and filter tags
- Adding rewrite rule dynamically
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- Valid filenames for add_action’s first parameter
- WordPress class, using add_action to call member function does not work
- How to get all queries’s results after they have executed?
- Hook add_attachment error
- Call to undefined function is_home() or any conditional tags
- How to find list of all functions bind to a particular hook from my plugin?
- Include HTML (Bootstrap Modal Box) with a plugin into my header
- Adding tables to dashboard pages programmatically?
- apply_filters() and call_user_func() to define and call a function outside a class
- WordPress Plugin Boilerplate – add actions and/or filters based on user’s role
- WordPress Reset password Strength set to medium
- Apply function on all action hooks?
- Ninja Forms: Front-End Forms, Post ID?
- How to override existing plugin action with new action
- Which hook should be used to add an action containing a redirect?
- WordPress Update Plugin Hook/Action? Since 3.9
- Where is the best place to use add_filter
- How to add sub-menu to a menu generated by wp_nav_menu by using plugin
- How can I load a page template from a plugin?
- Which action for triggering cron “wp”or “init”?
- Using query_vars filter
- add_action with a class method is causing fatal errors
- How to get Post ID with the Add Filter Function
- Explanation of the “posts_join” and “posts_fields” filter hooks?
- How do I print a notice only on certain admin pages?
- Do I need to call do_action in my plugin?
- How Do I Load My Action Earlier Enough?
- How Can I Add a Filter to Class Instance Only?
- Which to use to execute code during the saving of a plugin settings page?
- Does WP fire delete_post when trashed posts are automatically deleted?
- What’s the earliest point I can get the queried object ID?
- Is it possible to remove next-post / previous-post with out creating a custom template?
- How to remove unwanted panels inside InspectorControls from core blocks in Gutenberg
- function triggered by “manage_users_custom_column” filter not working
- A Post is saved twice or more during add_action(save_post)
- Proper way to use apply_filters() with class functions?
- add_filter and remove_filter added before and after wp_query
- How to modify post content before writing to database?
- Some nav-menu filters do nothing
- Filter on the_content ignores shortcodes
- In a plugin, why is add_action(‘init’) not executed before the plugin is activated?
- Determine which theme location a wp_get_nav_menu_items is for
- How to change wordpress post title?
- Display only certain posts based on visitor’s country?
- Conditional add_filter?
- What action is called when drafts are saved?
- How can I hook into existing WordPress Bulk actions?
- Hook for post permalink update
- When is it too late to call the action wp_enqueue_scripts?
- Dynamically Override Fancy Title
- Calling apply_filters on non-documented hooks
- Odd behaviour with submenu link creation
- WordPress Media mime type filter problem 4.0
- How to allow Unfiltered HTML in a wordpress multisite install
- What is the Difference between directly call a function and call a function using add_action?
- Changing bloginfo description from a plugin
- Is there a way to verified if an add_filter is already applied?
- Does add_filter work outside functions.php
- Create a plugin to change the action to which a function is hooked
- Synchronize Custom post type tags to WordPress default posts tags
- multiple functions with same filter
- Modifying values with add_action to be sent to db
- How to redirect to action on custom page within admin section
- Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
- admin_notices not displaying in plugin
- Hook to get image filename when it is uploaded
- How to run an add_action hook for specific page
- Which action is triggered when a theme was modified?
- wp_transition_post_status does not change the status of the post
- add_filter : Passing an array instead of the callback function?
- Getting admin notices working for plugin errors
- How do I alter the comment form ‘allowed tags’ text in a plugin?
- Which are the hooks run before/after when a category’s deletion?
- Should action callbacks start with a verb?
- Execute Hook on the footer or header after activating a plugin
- WordPress after content Hook & external template part
- An echo line in a transition_post_status action leads to “cannot modify header information – headers already sent by”
- Two functions utilizing registration_errors filter
- Issue plugin commands in admin settings page
- My plugin class doesn’t work! [closed]
- Is there a Filter that I can use to filter the tags before they are inserted in to the database?
- WordPress is automatically linking plain text email addresses
- best practice for query string values – get_query_var always empty for my value supplied in query string
- get_current_screen() return null
- add_action not calling back to function