Shortcodes work because WordPress is set up to parse them when it outputs content. Including a shortcode in any plain HTML file won’t work because there’s nothing but the web browser to parse the code.
It’s possible to include some WP methods – such as in this question What is the correct way to use WordPress functions outside WordPress files? – but you’d likely be better off just taking the full HTML the shortcode outputs and pasting that into your file, rather than trying to bootstrap WP into HTML.
Related Posts:
- How to Output HTML tags in do_shortcode?
- Stray closing paragraph tag when using shortcodes
- Can I strip HTML tags in the “Compare Revisions” screen?
- How execute shortcode with javascript
- Enclosing Shortcode Within Another Enclosing Shortcode Breaks Output Functionality
- ShortCode and extra
- Convert HTML Script to Shortcode [closed]
- Two different inner shortcode under shortcodes or multiple nesting of inner shortcodes
- How to make shortcode which returns HTML?
- Better way to display multiple plugin output on the same page?
- Returning HTML to Shortcode Block
- Shortcode not working inside div html
- the_content() not showing the content in good order (with a shortcode)
- Insert HTML in content property and render it using shortcodes
- How to completely prevent WordPress from destroying/modifying my shortcode outputs?
- Using get_option() in JavaScript
- Shortcode empty attribute
- Using wp_editor in shortcode
- 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?
- Using audio shortcode for .mp3 URLs with a query string
- Get multiple shortcode attribute values
- Why do_shortcode is not executing the shortcode in data-* html attributes?
- Is shortcode_unautop() broken?
- Some doubts about gallery shortcode in WordPress
- has_shortcode for content added after the content
- Shortcode displays only default attribute values
- Creating a Slider Shortcode Based on Nivo Slider
- How can I make a shortcode from this code?
- Adding PHP/HTML code inside page from custom template
- WordPress auto adds p to shortcode parameters
- Why isn’t this youtube shortcode working?
- Gist shortcode is not working
- How to change page title (from a plugin) in twentytwentyone theme
- WordPress Code Standards and Working $link Parameters In Shortcode
- How to set Contact Form 7 fields default value using shortcode attribute? [closed]
- Display post metadata: “title, category, author, date” with shortcode
- Shortcodes Keep Wrapping in
- Check if post has gallery images/media
- If you add a shortcode programmatically, but the code isn’t viewed on that request, is it still executed?
- Shortcode help: If no image entered take default
- How can I escape a section of my page which contains multiple shortcodes?
- AJAX and Shortcode with Parameters
- How to prevent shortcode preview from breaking in tinymce editor?
- How to protect parts of my code from TinyMCE modification when switching from text to visual mode?
- Responsive Embeds using default embed shortcode
- 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
- Custom shortcode breaks my page
- Add shortcode with open close function
- Shortcode is not working
- Custom shortcode is causing a WSOD
- Why can’t I display attachment_image_src with Custom Size?
- Get attributes of nested shortcodes
- Shortcode Strategy
- Enclosing Shortcode is acting like self-closing
- Shortcode into the same shortcode
- How to create a shortcode to let the user add the ID of a YouTube video?
- Execute shortcodes in PHP
- A shortcode nested inside a shortcode
- Custom Shortcode + Querying and Ordering Posts using multiple Advanced Custom checkboxes
- Add div on EMED Tag
- call other shortcode in the email contactform7 send [closed]
- Putting a space between the buttons [closed]
- Dynamic number within shortcode
- How can i strip shortcode from HTML title tag?
- WP REST API remove the WordPress shortcodes from the JSON wp/v2/posts content->rendered
- How to display html element and php string in the same line?
- Hide download option video shortcode
- WordPress Shorcode Display hierarchical taxonomy [child, parent]
- Shortcode not working in Jetpack Top Posts & Pages widget
- Restricting shortcode for users
- Gutenberg running code only available in front end within shortcode
- 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?
- create shortcode that changes url endpoint
- Convert WordPress shortcodes into plain html
- Attributes are not passed on nested shortcode
- How to make a shortcode with a line break in it parse correctly?
- Removing text + shortcode from all posts
- Plugin Shortcode value in post
- Woocommerce Filter Main Loop by Tag [closed]
- Shortcodes: override a shortcode / change shortcode on the fly
- Access the resized images generated by `add_image_size()`
- Separating Custom Template logic
- Custom WP theme not showing shortcodes
- woocommerce Product shortcode create [closed]
- A number appears inside a div called wpb_wrapper, when I use a custom shortcode
- Enclose article’s body with default shortcode
- Why is my ajax live search not working when i use a shortcode to call it?
- Shortcode with foreach
- My first WordPress shortcode just returning []
- WordPress shortcode select option not working [closed]
- Working with Shortcode, AJAX, Elementor
- How to exclude some cats from wp_list_categories using shortcut
- How can I create a shortcode that shows a list of categories on the single product page?