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 can I load a page template from a plugin?
- add_action with a class method is causing fatal errors
- How to get Post ID with the Add Filter Function
- Do I need to call do_action in my plugin?
- How Do I Load My Action Earlier Enough?
- Which to use to execute code during the saving of a plugin settings page?
- What’s the earliest point I can get the queried object ID?
- A Post is saved twice or more during add_action(save_post)
- How to modify post content before writing to database?
- Filter on the_content ignores shortcodes
- How to change wordpress post title?
- Display only certain posts based on visitor’s country?
- Hook for post permalink update
- When is it too late to call the action wp_enqueue_scripts?
- Dynamically Override Fancy Title
- Odd behaviour with submenu link creation
- 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?
- Create a plugin to change the action to which a function is hooked
- multiple functions with same filter
- Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
- admin_notices not displaying in plugin
- 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?
- 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”
- 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
- Plugin with action ‘save_post’ needs to press publish twice on order to publish
- How to check current user before all actions and filters?
- Can’t get woocommerce_get_price_html to work [closed]
- wp_set_object_terms not updating database without a die()
- Get Time Taken By Each Action Hook in WordPress
- Search and Filter
- WordPress custom taxonomy check box to dropdown
- load_plugin_textdomain doestn’t work with add_action plugins_loaded
- Show error message after exception handled
- Using ob_get_content to get_search_form puts into infinite loop
- What action hook can I use to add a JavaScript to a page post using a theme template that is not including get_header() nor get_footer()?
- Bug: Post needs to be updated twice when adding action for save_post hook
- Delete data from database using row action
- When does save_post hook fire on post save/update
- Remove an action by extending class and replacing it
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- Can I Hook Into the TinyMCE Insert/Edit Link Button to Use Shortlink For Post?
- Using init hook for register_taxonomy is causing invalid_taxonomy in wp_insert_term()
- WP_NAV_MENU filter targets all menus
- How to use add_action for multiple instances of the same class
- How do i remove the title from a specific page
- Is there an action_filter hook to add content before the post title?
- Limit get_next_post to posts from the same author
- Where do I hook to have the server do something in PHP on block attribute change?
- Any way, hook to add content right before the “read more” link?
- Post is uncatagorized in publish_post action
- do_action from within a class does not seem to work
- Redirect theme directory to plugin theme directory
- remove different admin menu for specific users
- Change Front page displays settings conditionally when user is online
- Modify search form with plugin
- Single_template for a custom post type created from a plugin is returning an empty page
- Confusing $tag specification for apply_filters call, in core options.php code
- WordPress permalink setting
- Apply Filters Causing a 500 Internal Server Error
- add_filter adds output in the head
- Do Not Back Up? Is there any accepted way to tell backup and clone plugins to skip a certain file? [closed]