if you want to keep the current setup, try to hook in early and use do_shortcode()
:
function av_standalone_doc_404($content)
{
remove_filter( current_filter(), __FUNCTION__ );
if ( has_term( 'standalone-document', 'formats' ) )
{
$filtered_content = do_shortcode( $content );
// …
If you want to avoid repeating shortcode outputs use a static variable in the shortcode handler:
function shortode_handler()
{
static $done = FALSE;
if ( $done )
return;
$done = TRUE;
// create the shortcode output; this will happen only once.
return $output;
}
Related Posts:
- apply_filters(‘the_content’, $content) vs do_shortcode($content)
- Insert Custom HTML After Shortcode
- Format content value from DB outside of WordPress filters
- the_content getting current page content instead specified ID
- How to wrap pattern-matches from the_content in [wiki]-shortcode tags
- How to appending to the_content using add_filter with custom post type?
- How to get shortcode’s input values inside a filter?
- How to wrap an element around an iframe or embed in content automatically?
- Filter specific shortcode output?
- WordPress Internal @ Mentions
- Where to hook into post content?
- Is there a way to add another row to the tinyMCE kitchen sink toggle?
- add_filter and changing output captions of image gallery
- Get excerpt from $post->post_content
- Add Class to Specific Paragraph of the_content()
- add_filter for specific pages
- What params are available with the_content filter?
- Using variable from one filter in another filter
- apply_filters(‘the_content’, $content) alternative
- What effect does the_content filter have on performance?
- How to add attribute to output with wp_video_shortcode add_filter
- Search content for shortcodes and get parameters
- How can I display image metadata?
- Change default settings used by gallery shortcode
- Add post/page ID to inserted links within the_content
- How to apply content filter permanently?
- How to prepend text to the_content, but after img/shortcode
- Shortcodes not resolved in AJAX call response
- Ajax, filters and shortcodes
- Use content custom filter for all shortcodes
- How to link current user to their author page through shortcodes
- What is the filter hook for custom fields content?
- filter title from shortcode
- how to remove filter from wordpress shortcode output
- Filter Gutenberg Blocks Content
- Return array of images after content
- Nested calls the the_content filter
- Error when overriding only some audio shortcode HTML output
- How to use shortcode attribute in separate function
- Apply the_content filter, but prevent other hooked actions
- Wrap h1-h6 in a div
- How to change the order (priority) of registered filters (or actions) (e.g. for the_content)?
- Function the_content not working
- ‘the_content’ filter removing html tags from post content
- add_filter(‘the_content’, ‘…’) stops pagination from working
- Post Content, Special Characters and Filters
- Shortcodes — Using add_action, add_filter in the shortcode
- How to hide Ads in between posts on AMP? [closed]
- Add content as soon starts
- Remove Content Filter
- How to filter backend post list showing only posts having a shortcode
- Replace audio links with jplayer using the_content filter
- Add a div of content within the_content after a certain block
- How do you get specific tags from the_content?
- Can i use multiple ‘the_content’ filters?
- How can I return shortcode output to the top of the content?
- get_post() containing gallery is outputting an unmatched closing div at the end of the content
- the_excerpt filter doesn’t work as expected
- Load Posts’ individual body content on index starting at char 200 of each post
- Excerpt is being added above the content, but it should be after it
- run shortcode in excerpt of single custom post type
- What is the earliest hook to modify post content?
- Filter everything from content except output of a shortcode
- Something is filtering my shortcodes… Can’t figure out what
- Filter content for get_the_content()
- How to use do_shortcode_tag to modify the output of a shortcode?
- Shortcodes within the sidebar text/html widget: How to preserve the raw HTML output of the shortcode?
- How can I filter tag_description()?
- Why is overwriting $GLOBALS killing the_content()?
- WordPress removing slashes from shortcode output
- add_filter the_content doesn’t work
- How can I get the default content of WordPress post?
- Email Obfuscation: Is antispambot() Acceptable? [closed]
- How to remove shortcode(s) from WYSIWYG Page editor for Non Admins
- alternative to the_content filter
- Shortcode / plugin with custom (flexible) output
- Filter Shortcodes when using get_page
- Parse a shortcode differently based on on what it’s nested in
- Filters on the_content with plugins, pages and shortcode
- post_orderby filter breaks function
- Scanning for custom embed and prefetching
- How to Create custom block for displaying information in content section which act like shortcode
- get_post() with filters applied
- Override wordpress audio playlist
- Add Index to Item in WordPress Gallery
- Set Microsoft Word links to open in new window/tab
- How do I isolate the reason a wordpress filter is not running?
- the_content filter not working when Jetpack activated. Any idea?
- Auto-generated excerpt with shortcode and read more button/text link
- shortcode function outputs multiple anchor tags
- Change shortcode output (filter?)
- Can’t get content of all (19) posts – Incomplete Chunked Encoding
- Is it possible to include the add_filter() function within a shortcode function
- Activate short codes for all post queries?
- Problem with shortcodes in external file
- filter on the_content stopped working when I updated to WP 3.6.1
- post->post_content filter
- Replace image scr with it’s surrounding href
- After adding filter to plugin’s code, post’s content doesn’t display
- Limit total tags in the_content