There is a way to apply that to all post content.
function sc_all_content_wpse_137734($posts) {
foreach ($posts as &$p) {
$p->post_content = do_shortcode($p->post_content);
}
return $posts;
}
add_filter('the_posts','sc_all_content_wpse_137734');
I would suggest that this is a very, very good way to break things. Plugins and themes will not expect shortcodes to be rendered that early, and the code above will break shortcodes that depend on the $post
global
, though that could be gotten around with setup_postdata
.
Related Posts:
- apply_filters(‘the_content’, $content) vs do_shortcode($content)
- How to get shortcode’s input values inside a filter?
- Filter specific shortcode output?
- Insert Custom HTML After Shortcode
- Is there a way to add another row to the tinyMCE kitchen sink toggle?
- add_filter and changing output captions of image gallery
- How to add attribute to output with wp_video_shortcode add_filter
- Search content for shortcodes and get parameters
- Change default settings used by gallery shortcode
- Shortcodes not resolved in AJAX call response
- Ajax, filters and shortcodes
- Format content value from DB outside of WordPress filters
- Use content custom filter for all shortcodes
- How to link current user to their author page through shortcodes
- filter title from shortcode
- how to remove filter from wordpress shortcode output
- Error when overriding only some audio shortcode HTML output
- How to use shortcode attribute in separate function
- Shortcodes — Using add_action, add_filter in the shortcode
- How to pass variables to custom filter from multiple functions
- How to filter backend post list showing only posts having a shortcode
- How can I return shortcode output to the top of the content?
- the_excerpt filter doesn’t work as expected
- run shortcode in excerpt of single custom post type
- Filter everything from content except output of a shortcode
- Something is filtering my shortcodes… Can’t figure out what
- 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 to change dynamically page title according to variable data?
- How can I filter tag_description()?
- WordPress removing slashes from shortcode output
- How to remove shortcode(s) from WYSIWYG Page editor for Non Admins
- Shortcode / plugin with custom (flexible) output
- Filter Shortcodes when using get_page
- Parse a shortcode differently based on on what it’s nested in
- Need to return shortcode text instead of the output
- add_filter to the_content after apply_filters
- post_orderby filter breaks function
- the_content getting current page content instead specified ID
- Override wordpress audio playlist
- How to wrap pattern-matches from the_content in [wiki]-shortcode tags
- Add Index to Item in WordPress Gallery
- create a shortcode with acf including a filter
- How to take shortcode and content separately from a page?
- Auto-generated excerpt with shortcode and read more button/text link
- shortcode function outputs multiple anchor tags
- apply_filters to $GLOBALS
- Change shortcode output (filter?)
- Is it possible to include the add_filter() function within a shortcode function
- Problem with shortcodes in external file
- How can I display wp_link_pages before a shortcode, if it is used, or display after content?
- Add custom options to the wplink dialog
- Insert new element to array with add_filter
- How can I add information underneath the user’s name on the users.php page?
- Is calling function_exists() faster or slower that apply_filters()
- Filtered query_vars becomes global. Why does this work?
- Alter only the page title, not the post titles within
- Load different template file when condition met?
- How can override a add_filter of a plugin?
- Adding Filter Conditionally Per Page ID
- Nested calls the the_content filter
- How to change domain used when pinging sites
- Is it possible to track down Actions and Filters?
- Adding id and class to the search input in WordPress search form
- Multiple filters for wp_get_archive
- Filter and modify entry-footer link in twentyseventeen
- Filter Posts by current Month
- Break out of wordpress filter
- Are there actions or filters I can use for Ajax calls?
- How to filter for user registration, be able to throw error message
- No ‘Access-Control-Allow-Origin’ header is present [closed]
- How to prepare WordPress Rest data for Preview Changes?
- Contact Form 7: Make field required after checkbox is checked
- How to filter $content in shortcode function
- Customize title, description and focused keyword [closed]
- wp_mail works with add_action(‘save_post’, …) but not an ajax action
- Is it possible to put the add-filter()-hook into a function?
- separate categories with comma and srounded by single quote
- Filter for when the post is updated
- Filter a pluggable function
- apply_filters(‘get_the_content’, $content) + Except
- Filter have_posts()/ the_post()
- Is it possible to add a shortcode below post title?
- Filter get_page_by_path()
- How to add filter in custom rss feed
- How To Get Search Term and Use in Function
- Filter the title to only affect the_title() template function
- How can I filter the comment action links so that I can display the actions links based on user capabilities?
- How can I limit access to uploaded media depending on the logged in user’s user role?
- How can I filter same content in page
- WordPress Tag Cloud Filter Prevents Widget HTML from loading
- Using add_filters() , apply_filter(), add_action() and do_action() in extending a plugin
- the_content filter not working when Jetpack activated. Any idea?
- Adding Filter | Page Title | Template | Why the_title affecting on menu?
- gettext filter does nothing
- Code restricted to dashboard, running unexpectedly in the frontend (pre_get_post and admin-ajax.php)
- Filter on widget-title does not work with custom links
- How to elect position of new item output in a dropdown when using add_filter
- Query Multiple Filters, one with Meta
- How to remove a filter that is an object method?