So, as iguanarama pointed out, the first step is to make sure that the theme you are using uses the_excerpt()
to show the excerpt.
You’ll want to go check in your archive.php
file how it is displayed. In my theme it was using the file 'template-parts/content-front-c.php'
. Then go to this file and see what is the function displaying the excerpt. Right after the function gets the content, add $content=strip_shortcodes($content);
, and, in my case, it worked !
Related Posts:
- Return HTML Template Page with PHP Function
- Is there a way to parse shortcodes in PHP?
- Display sorting options dropdown when using WooCommerce product category shortcode
- Retrieve multiple values passed to a single attribute in a shortcode
- ob_get_clean returns empty string, ob_get_flush outputs string
- Export User Info to CSV from Front End
- Counting number of posts in a category and its sub categories and displaying result using shortcode
- Shortcode created to check language not works
- Limit the_excerpt with max of x characters
- Remove at the beginning of the_excerpt() with str_replace
- Add/echo div with Analytics-Code to function in functions.php
- Automatic Excerpt Not Working
- Trim first 2 words of the exceprt
- How do I hardcode a WordPress shortcode into my theme?
- How to return multiples lines in a shortcode?
- How can I default to all WordPress roles when parameter is not included in shortcode?
- PHP contact form returns warning in text widget [closed]
- Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]
- Recent post display using shortcode
- How do I turn a shortcode into PHP code?
- Need to turn this php into WP shortcode
- How to limit the content coming from wordpress shortcodes?
- How to return a foreach inside a shortcode
- custom shortcode will not display the wrapped content
- Shortcode content output but not in correct place
- PHP code inside shortcodes
- How to Display a Single Post Excerpt
- How to remove the excerpt in the Dzonia Lite theme
- Trigger popup in a php if/else statement
- Append HTML Using Shortcode
- How to output a PHP file values by shortcode?
- Mass update excerpt
- Pass php dynamic variable to shortcode
- Creating own shortcode – echoeing php variable based on JS variable
- do_shortcode with custom field
- Remove echo from shortcode
- Query Pages and post excerpts dynamically
- Shortcode to show the code
- Get URL from shortcode tag
- Multiple do_shortcode in page template
- Shortcode from a function not working
- Is it possible to return content, and then also continue to do other things?
- anyway to put inside a $outprint=sprintf()
- $wpdb returns duplicate posts
- Creating WordPress Shortcode with Variable
- Catchable fatal error: Object of class stdClass could not be converted to string
- Shortcode to find and replace URL
- Could use some help with Shortcodes
- How to put a form with php code into a variable or shortcode?
- Automatic excerpt is not shown with the_excerpt() command
- Shortcode to embed Edit Account form not working
- Line breaks inside shortcode variable
- Handling PHP/HTML inside the output of a shortcode function
- Need to Modify a WordPress Shortcode with another wordpress shortcode
- Split shortcodes to array of shortcodes
- How to remove the space before the ellipsis in excerpt?
- Calling PHP Titles inside Javascript Markup
- How to get my [shortcode] rendered on the home page, other pages are fine
- Including Custom fields within the_content
- What is the difference between Null vs Empty (Zero Length) string?
- Problem in replacing the_content with the_excerpt()
- MySQL Query Returns Array () In Shortcode
- Show Featured Image Dimensions and size frontend with shortcode
- How to work Woocommerce pagination inside shortcode?
- How to get woocommerce orders with get_posts method in a shortcode
- Counting number of posts in multiple (sub)categories using shortcode
- Display Visual Composer shortcode if a post belongs in specific categories
- is it possible for a URL to filter by tag
- Trying to create a shortcode to display categories with a specific product tag
- How to pass parameters in wordpress shortcode?
- How can I prevent a shortcode div from extending beyond its boundaries?
- Adding variable in WordPress shortcode
- Display a custom name when the user has no name settle in his account
- Find and print first entry from WordPress post in custom excerpt?
- Execute Shortcode in Textfile
- Echo short code syntax
- custom taxonomies not working
- How to return html as a string from php for WordPress
- Changing Date Format on Custom Meta Data w/shortcode call
- Add the shortcodes from the enfold theme to the other theme
- How to output values from a loop into a javascript array
- Offset with ajax load more posts duplicates
- Shortcode’s output to use as other shortcode’s parameter
- Short code into PHP
- How can i iterate through this shortcode array?
- Shortcode in a $output statement
- Need help with PHP functions
- When using shortcode, content stops generating after the_content
- PHP Shortcode – 500 error
- Run PHP Results inside WP Shortcode
- Shortcode At top of Page – PHP 5.5 vs 5.4 – ob_start();
- Archive page if else not working for post_excerpt and post_content
- On selecting shortcode generate selected shortcode table inside page editor worrdpress
- Using the same shortcode to show any table from the database
- Shortcoding with Divs
- My title is showing after the shortcode
- Shortcode to include PHP file, pass various parameters to include?
- Shortcode for Visual Composer Grid fails turning string to integer
- Is there a better way to output HTML as a shortcode?
- How to edit a widget code?