To have a Network enabled shortcode, you only need a Must Use plugin. Just create the folder /wp-content/mu-plugins
and drop your code there. From the Codex:
- Always-on, no need to enable via admin and users cannot disable by accident.
- Can be enabled simply by uploading file to the mu-plugins directory, without having to log-in.
- Loaded by PHP, in alphabetical order, before normal plugins, meaning API hooks added in an mu-plugin apply to all other plugins
even if they run hooked-functions in the global namespace.
The search and replace issue seems a bit more sensitive and maybe this plugin can be of use: Search and Replace and do it only in the post_content
field. You can also use the filter the_content
, search this site for various examples on how to deal with it.
Related Posts:
- Conditionally Loading JavaScript/CSS for Shortcodes
- Pass boolean value in shortcode
- Escaping quotes from shortcode attributes
- How to add ‘class’ attribute into shortcode [audio]?
- Automatically add this attribute to the gallery shortcode
- How to make shortcode to hide selection of text from post or page?
- How to handle valueless attributes in shortcodes?
- Get multiple shortcode attribute values
- wpautop() when shortcode attributes are on new lines break args array
- Remove width and height attributes from [gallery] output
- Add attribute to existing Shortcode
- Shortcode displays only default attribute values
- Extending Shortcode attributes
- Remove HTML content if attribute is not set / variable attributes
- getting values from a shortcode with an include
- Searching in shortcode contents
- How to make shortcode output display where I choose
- Why are Shortcodes Disabled in Widgets by Default?
- Add attribute to shortcode dynamically
- Replace / Remove Shortcode after 1st run / post
- Caption shortcodes not including caption as attribute
- Preserve shortcode content formatting
- Conditionally Loading JavaScript/CSS for Shortcodes
- Check if CTP category taxonomy is set in shortcode
- Passing variable in nested shortcodes
- How to use a nested shortcode to render the value of an attribute in parent shortcode
- Which wordpress function is the caption shortcode linked to?
- How to include shortcodes and pdfs in WordPress search without plugin?
- WP_User_Query Search Multiple Keywords from a Multi-Select Field?
- the_excerpt displaying code inside style tag
- How to process a single attribute in a SQL request twice times?
- shortcode atts not working
- Second attribute of shortcode is not changing why?
- Replace custom gallery shortcode with default gallery shortcode
- Shortcode Attribute contains clone of all shortcode attributes
- How can I define the output of shortcode attribute value?
- Remove width and height attributes from [gallery] output
- Using get_option() in JavaScript
- Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
- How to display the site name in a WordPress page, or post
- How can I put a wp_redirect into a shortcode?
- Is shortcode_unautop() broken?
- Some doubts about gallery shortcode in WordPress
- How can I make a shortcode from this code?
- Extending the Audio Shortcode
- How resource intensive is wp_register_script()?
- Convert shortcode into html form [closed]
- Using API to generate short link
- How to enable shortcodes in text retrieved from get_theme_mod
- Call Shortcode inside another Shortcodes callback
- MathJax inside shortcode
- Custom URL going to 404
- Shortcodes attributes defaults
- Get Required Assets (JS, CSS etc) for post using REST API
- Best place for short bio,image and button [closed]
- Custom search to display results within same page
- How to protect parts of my code from TinyMCE modification when switching from text to visual mode?
- Shortcode output appearing at the top of the page only [duplicate]
- problem with shortcodes nesting
- OOP and WordPress shortcode
- PHP/WordPress — How do I check if Shortcode returns content?
- Convert my php code into shortcode
- Add shortcode with open close function
- Shortcode is not working
- Custom Search on Custom Page while preserving the main search function
- Why can’t I display attachment_image_src with Custom Size?
- Shortcode Strategy
- Enclosing Shortcode is acting like self-closing
- Shortcode into the same shortcode
- Execute shortcodes in PHP
- A shortcode nested inside a shortcode
- Custom Shortcode + Querying and Ordering Posts using multiple Advanced Custom checkboxes
- call other shortcode in the email contactform7 send [closed]
- Putting a space between the buttons [closed]
- Is there any way to inject text onto pages?
- Dynamic number within shortcode
- How can i strip shortcode from HTML title tag?
- Returning HTML to Shortcode Block
- WP REST API remove the WordPress shortcodes from the JSON wp/v2/posts content->rendered
- Hide download option video shortcode
- WordPress Shorcode Display hierarchical taxonomy [child, parent]
- Shortcode not working in Jetpack Top Posts & Pages widget
- Redirecting wordpress search query to archive page
- Gutenberg running code only available in front end within shortcode
- Insert HTML in content property and render it using shortcodes
- Redirect per shortcode if user is logged in
- Shortcode, vs blocks, vs templates – what would you do for choosing or creating custom post data in editor?
- Convert WordPress shortcodes into plain html
- Custom dropdown search form that allows users to select option B based from Option 1
- Plugin Shortcode value in post
- Woocommerce Filter Main Loop by Tag [closed]
- Shortcodes: override a shortcode / change shortcode on the fly
- Separating Custom Template logic
- Auto Linking Words But Only One Time
- woocommerce Product shortcode create [closed]
- Why is my ajax live search not working when i use a shortcode to call it?
- My first WordPress shortcode just returning []
- WordPress shortcode select option not working [closed]
- How can I make a search term redirect to a page
- How to use multiple values in “Shortcode”? [closed]