I suggest you to create a Network-only
plugin that is Active for all the sites in the network and define your shortcodes
inside.
To make specific plugin Network-only
you need to add Network: True
to your plugin definition, just like the example below.
Change:
/*
Plugin Name: My Awesome Plugin
Plugin URI: http://yourplugin.com/
Description: This is my extremely awesome WordPress plugin
Version: 1.0
Author: John Doe
Author URI: http://yourcompany.com
License: GPLv2
*/
to the following:
/*
Plugin Name: My Awesome Plugin
Plugin URI: http://yourplugin.com/
Description: This is my extremely awesome WordPress plugin
Version: 1.0
Author: John Doe
Author URI: http://yourcompany.com
License: GPLv2
Network: True
*/
After this is done make sure you activate your plugin from the Network Admin
and the shortcodes defined in your plugin should work on all the sites in the network.
Related Posts:
- Making my plugin multi-site compatible
- How do I add a widget programmatically to a newly created site (WPMU) within a plugin?
- WordPress network: set themes and plugins for new blog
- What is the function to get plugin base url in multisite?
- Having separate plugins and themes folder for multi-site setup
- Is it possible to set up multistore in Woocommerce? [closed]
- How to add class in plugin only for network site?
- How to write a plugin to add users to a mail list
- Redirect to another page using contact form 7? [closed]
- Certain functions are undefined when called form mu-plugins
- WordPress Multisite: Programmatically Activate / Deactivate a Plugin of a Specific Blog
- How to remove a CPT Menu from the Root Admin only
- How to get values from network settings panel?
- Activation flow of a plugin in a multisite environment
- WP Forms not displaying,becomming an fatal error
- Fatal error: require_once(): Failed opening required
- How to capture hidden values with Gravity Forms
- Creating one user access account for all the multiple sites
- Why my multisite is this slow? (stats inside)
- Coming soon pages with rest of site in maintenance mode
- Force Network Activated Plugin to Run After Site Level Plugins
- How to set the default options on an existing plugin in a WP MU new user install
- Check if user is in a group of another site within multisite network [closed]
- Active Plugins for current blog in WP Multisite Network? [duplicate]
- Add custom fields in the new and edit the site forms without touching the WP core
- How to add a shortcode button to the TinyMCE editor?
- Plugin upgrading: Widget settings
- Create a table in custom plugin on the activating it?
- How would you require and automatically download dependent plugins?
- Multi domain, multi sites with different themes and content
- Getting Custom Post Type content from main-site of a Multisite
- Editor not displaying dynamically after clicking on the button
- Publish Post After Click On A Link
- Custom url structure for custom template
- How to submit documentation with plugin
- Placement of Code in Plugin for hooking `save_post`
- gallery option is not available in media upload box in costum theme option page
- How can plugins have their own pages?
- How to keep users unique id stored in session in addition to IP in WordPress plugin?
- JS Support Ticket – Auto create WP account
- uninstall.php file in Plugin to clean DB
- Python with wordpress plugin
- Passing an array from shortcode-function to filter-function
- WP_Async_Task doesn’t appear to be running asynchronously
- TinyMCE Styles Dropdown not adding html tags other than span
- add_filter doesn’t work
- How can I insert thousands of Woocommerce products by batch with PHP? [closed]
- What are the Best Practises When Using AJAX in Plugin Development?
- Run function on plugin activation before plugin is loaded
- Create a single website with 3 theme options in wordpress
- execute function after one completed
- How to Resize the Custom Post Images?
- WordPress super admin login issue. (Automatically logout)
- Why is it important to check for isset and is_array before checking in_array in this example?
- Upload files to the plugin menu
- Hosting multiple sites
- Licensing a Plugin [closed]
- Don’t load the theme for a page FROM a plugin EDITED
- WordPress Feed Creator Name Tag Full Name Instead Of First Name
- WordPress plugin with its own “site”/theme
- How to add custom function to pluggable.php
- Multisite Plugin – Access options (wp_options) on child sites
- Security of a WordPress Plugin
- Remove Zero Money From Previews Order woocommerce
- Access remote SFTP server via WordPress login?
- Can I edit multiple sites with an online WordPress account?
- Shortcode do not return the right data in post
- Performance considerations – postmeta table versus new table for custom posts with foreign keys?
- Avoid WordPress header bar when form submission using admin_post in the frontend
- Set “Open in New tab” as default option
- Generate and send ICS file through WordPress
- Field salespeople task management
- Echo custom admin field into a is_single()
- WordPress Boilerplate Plugin doesn’t see callback functions for add_settings_field and add_settings_section
- Hide ‘add to cart’ button for some products [duplicate]
- Add Flatr button to Sharing option
- Change localization only for plugin
- How to get author developer link on plugin page
- wp_schedule_event need to deactivate plugin changing recurrance
- How do plugin updates work?
- Is there going to an issue running different features of WP site in different subdomains?
- Create New Admin Menu Section – Like how custom post type works, in a way
- Customize Multi-Column Tag Map to fetch specific post-type
- Combining JS files to one script
- Upload Image to desired directory through plugin
- Custom wordpress plugin does not save select element
- How to set meta-data for my plugin
- WordPress isn’t sending welcome email with the password reset
- A splash page on landing page
- Inline AJAX script passing variables to PHP
- I’m getting the following error: Fatal error: Uncaught Error: Call to undefined function oil_paint_regeneration() [closed]
- how to code activate/deactive button of custom plugin within backend?
- move setting data from wordpress api to codestar freamwork
- How to access the page without registering in wordpress
- CPT template is not being automatically used single post pages
- How to trigger plugin migration code when plugin updates?
- How to Save Category and Delete Category in same Function
- claim a permalink and all sublinks in plugin
- Vanilla javascript in custom gutenberg block not working
- How to use `$order->get_discount_total()`, avoiding defoult WC decimal rounding?