AI Verified

Name

Allow [code_snippet] shortcode in excerpts

About

By default, WordPress strips all shortcode tags out completely when creating the excerpt text for a post. This snippet prevents that from happening for the [code_snippet] shortcode, allowing you to embed Content snippets within post excerpts.

Language

PHP

Rating

Voted: 0 by 0 user(s)

Codevault

shea

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.1

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

02/10/2023

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Allow [code_snippet] shortcode in excerpts

 
                    
1add_filter( 'strip_shortcodes_tagnames', function ( $tags ) {
2 return array_diff( $tags, [ 'code_snippet' ] );
3} );

0

Related Snippets

Please see some snippets below related to this snippet..

General

Unverified

0

databasemainActivity

Added: 2 months ago

Last Updated: 2 months ago

General

Unverified

1

Apple-Mobile-Menu

Added: 4 months ago

Last Updated: 4 months ago

This is how to add a Mobile Menu like the Apple Website with the use of stacked containers with IDs to control navigation and what is shown/hidden. This should be added to HTML.

General

AI Verified

0

Better Breadcrumbs

Added: 7 months ago

Last Updated: 7 months ago

Two main customizations are made:1. Changing the label of the 'home' breadcrumb based on the current page.2. Modifying the URL linked to the 'home' breadcrumb depending on the page.

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WordPress Admin

AI Verified

21

Change admin footer text

Added: 1 year ago

Last Updated: 2 weeks ago

Customises the footer text in the WordPress dashboard.

General

AI Verified

2

Make upload filenames lowercase

Added: 1 year ago

Last Updated: 3 days ago

Ensures that the filenames of all uploaded files are converted to lowercase, for consistency.

WordPress Admin

AI Verified

1

Disable automatic scroll-to-notices when adding snippets

Added: 8 months ago

Last Updated: 7 months ago

By default, Code Snippets will scroll the page up so that new notices are visible when editing or adding snippets. This snippet disables that functionality for those who prefer a more consistent editi...