The core of your problem is that the_content
is a filter not an action, and it is supposed to return values, not echo them.
As for the “called number of times” part of the question, yes any hook can be called unlimited number of time. If you find that you need to return one result on the first call and different on the others it is a sign that you are doing something wrong or extremely hacky.
Related Posts:
- How to roll back a WordPress plugin update?
- How can I modify the Capability needed to access a plugin’s options?
- Allowing Yoast SEO plugin to track me
- Exclude custom post_type in sitemap generation?
- Yoast SEO blocking/re-initialising longer running process
- Can’t access my WP dashboard: fatal error? [closed]
- Add custom taxonomy to title tag [closed]
- One of my plugins broke when I tried to update it, how do I safely uninstall it?
- Error “preg_match_all” with WordPress SEO by Yoast plugin [closed]
- WordPress display breadcrumbs using Yoast plugin [closed]
- Yoast SEO plugin “could detect no serious SEO problems” on dashboard
- WordPress Sitemap including pages that aren’t there
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- Replace default og:image tag YOAST
- Every new post/draft has a custom field variable “yst_is_cornerstone” showing
- How to remove/hide Yoast’s “SEO” tab in admin panel?
- Show Sitename on Yoast SEO Title tag [closed]
- Help in using SEO Plugins: SEO Ultimate And Yoast SEO Plugin
- Yoast SEO settings unavailable in an archive page from wordpress plugin
- Remove Yoast jQuery from front end
- Yoast Force Rewrite Crashed Site [closed]
- How-to: This block can only be used once
- wp-admin send 404 error
- How to track analytics with a WordPress site under the same domain as my main site?
- YOAST Seo xmlsitemap menu item not showing in the dashboard [closed]
- Set domain level rel canonical with Yoast SEO [closed]
- Override methods in Yoast SEO breadcrumb class
- Yoast SEO Plug In and my Theme duplicating code. Need some feedback on what to do? [closed]
- custom wordpress theme and yoast seo injecting text in body
- Does anyone know why my SEO and title become one?
- My wordpress local urls is still displayed even moved to live
- SEO Site Title appearing in google search despite not being added
- Replace Yoast og:image in single custom post type
- Yoast Seo Plugin meta title not showoing [closed]
- Mystery URL http://#/ Listed in XML Sitemap Created by WordPress SEO by Yoast Plugin
- How to clean up unnecessary file inside wp-content/plugins/wordpress-seo?
- Open graph issue on my theme
- TypeErrors with Yoast, jQuery in conflict?
- Possible to change meta data single quotes to dobule quotes in yoast wordpress seo? [closed]
- Yoast Seo noindex added to pages outside wordpress
- Fatal error in wordpress
- YOAST slug does not take the custom permalink I have made
- how to make yoast seo read text from custom fields in custom post type
- Remove a specific sitemap from Sitemap_index.xml
- How to maintain W3C standards compliance of a theme
- Load plugin on specific page only
- Does a plugin’s “main” file need to be named the same as the folder containing it?
- Plugin or mod for wordpress to make content publication SUPER easy
- enqueue script only if it is not already enqueue
- Display (and manage) webcam images?
- Overwrite textdomain of plugins by default – Lost Translation
- jQuery plugin only in one page/post
- Google Analytics post views in WordPress? [closed]
- Hook (upgrader_process_complete) running moment
- Creating a modal dialog without jQuery
- Error Message from W3 Total Cache when .htaccess Rules Cannot Be Modified? [closed]
- How can I measure the performance of any WordPress Plugin or Theme?
- Can I check plugins and themes for PHP 5.6 ahead of global PHP server Update
- How can I reuse the WordPress search form for a custom plugin / widget?
- Can you switch the type of WordPress site you have?
- Where should a plugin or widget cache its results?
- Set of plugins to control the Admin UI
- How to get all plugins and their version numbers from the local files?
- Do We Need to Validate, Sanitize, or Filter Simple Numerical Superglobals (Cookies and Post)?
- How to transfer all user data between wordpress installations?
- Plugin upgrade issue
- Integrate BuddyPress & Facebook
- New databes tables with – WooCommerce – for developers [closed]
- Interactive filters on wordpress [closed]
- One file for all translations
- Send admin an email when a user’s search has no results
- Shortcode not working after move wordpress website files
- Contact Form 7 – Form name blank [closed]
- plugin dev – minimum base css specificity?
- How to place a function from another class in add_action 2nde argument?
- Creating an admin meta box to save post as pending
- How i can remove Working Functionality of my header & footer plugin from backend files but in front end plugin need to show that plugin activate
- WoCommerce Cart is not showing pricing
- Precheck fields when I add a new post
- How to capture hidden values with Gravity Forms
- Hide response returned from WordPress REST API call
- How to use plugin’s shortcode in custom design? [closed]
- Paid Membership Pro displaying a user name in PHP
- Customize plugin’s output: filters or setters: looking for an advice
- Make another copy of a plugin and install it
- WordPress drop domain alias
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- In the WordPress API is there a way to set the width of the post/page container
- Multiple calling javascript from shortcode in one page
- Is there a function to search for a wildcard value when calling a shortcode?
- Plugin does not create a custom table upon activation
- Automatic updates of plugins and themes outside of wordpress.org
- Hyperlink to execute PHP
- How to get site homepage from plugin?
- Link Forms on WordPress
- WordPress plugin WP-blocks is adding slashes before apostrophe
- Image rotator plugin
- Why does theme need woocommerce to show images / content on front page?
- WordPress Hooks : Where to place callbacks that repetitively yield the same effect?
- wordpress Ajax success doesn’t return the value