Shortcodes are processed on display so the code must be available on the front end when the shortcode is processed. Superficially, that means frontend.php
.
I have never tried to split shortcode code in this way. You may have trouble splitting it off from the backend. The add_shortcode
function is in wp-includes/shortcodes.php
which loads for both back and front, suggesting that it is at least possible that it is needed on the back end. I’d have to run some experiments…
Related Posts:
- Return HTML Template Page with PHP Function
- Is there a way to parse shortcodes in PHP?
- Shortcode putting html such as
- 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
- Add/echo div with Analytics-Code to function in functions.php
- 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]
- How to find the output of contact form 7 shortcode? [closed]
- Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]
- Can A Shortcode Get HTML/Text From Content And Return It Twice With Added HTML?
- Recent post display using shortcode
- How do I turn a shortcode into PHP code?
- Need to turn this php into WP shortcode
- 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
- Trigger popup in a php if/else statement
- Append HTML Using Shortcode
- How to output a PHP file values by shortcode?
- Pass php dynamic variable to shortcode
- do_shortcode with custom field
- Remove echo from shortcode
- Shortcode to show the code
- Get URL from shortcode tag
- Only first shortcode gets executed
- Multiple do_shortcode in page template
- echo something inside a shortcode
- Shortcode from a function not working
- Is it possible to return content, and then also continue to do other things?
- $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?
- Shortcode to embed Edit Account form not working
- Handling PHP/HTML inside the output of a shortcode function
- Shortcode for Listing Users from Meta Value?
- Need to Modify a WordPress Shortcode with another wordpress shortcode
- Split shortcodes to array of shortcodes
- Shortcodes showing in excerpt despite using strip_shortcodes
- PHP error with a shortcode: “no suitable wrapper” for file_get_contents
- Calling PHP Titles inside Javascript Markup
- How to make a conditional statement within $output in shortcodes.php?
- How to get my [shortcode] rendered on the home page, other pages are fine
- Shortcode displaying at the top of the page [duplicate]
- MySQL Query Returns Array () In Shortcode
- Why wp_remote_get() fetches certain web pages while it doesn’t work for my localhost?
- Show Featured Image Dimensions and size frontend with shortcode
- How to exclude labels from certain categories in a shortcode?
- How to get woocommerce orders with get_posts method in a shortcode
- Counting number of posts in multiple (sub)categories using shortcode
- Trying to call dynamic content into a 3rd party shortcode
- Shortcode in Shortcode/HTML Graphics and Pictures
- Why is the current page loaded in the pop-up window and not the specified one?
- How to search order using database frontend short code WordPress
- How to add a shortcode which runs a .php file for the current post
- Block error message in foreach loop when looping through ACF field
- How to pass parameters in wordpress shortcode?
- Get title of page containing post grid within the posts
- PHP multiple forms, same page, isset($_POST[]) not working?
- shortcodes, custom php and their errors
- Adding variable in WordPress shortcode
- Display a custom name when the user has no name settle in his account
- 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
- Why my Ajax events are no longer detected after dynamic change of shortcode content
- Add the shortcodes from the enfold theme to the other theme
- Offset with ajax load more posts duplicates
- Get posts by id using shortcode
- How can i iterate through this shortcode array?
- Shortcode in a $output statement
- Need help with PHP functions
- Shortcode is not outputting all of the desired markup
- 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();
- Serializing URL via wp add_shortcode to auto select from option list onload
- On selecting shortcode generate selected shortcode table inside page editor worrdpress
- Show contact 7 form in popup
- Using the same shortcode to show any table from the database
- My title is showing after the shortcode
- Shortcode to include PHP file, pass various parameters to include?
- Is there a better way to output HTML as a shortcode?
- Redirect loop upon installation of my plugin
- why css file not link?how to create permalink?
- Show Login Errors In WordPress/Elementor (Code “works”, but breaks site)
- Shortcode Displays 2 times