First of all as far as I know that you can’t call get_template_part() from your plugin.It’s a Theme only function . Try to keep your calculator code’s in a php file inside your plugin’s directory and include it like bellow:
function info_box_calculator_core(){
include( plugin_dir_path( __FILE__ ) . 'mydir/calculator.php');
//replace 'mydir/calculator.php' with your file name
}
add_shortcode('info_box_calculator', 'info_box_calculator_core');
Let me know if it works for you.
Related Posts:
- Adding PHP/HTML code inside page from custom template
- How to create a shortcode for custom page template
- shortcode javascript not working on custom template file inside theme folder
- Problem with multiple shortcode in page template
- Using shortcodes to communicate my page design
- Enclosing Shortcode not working in a Template
- Shortcode or Template Page
- Push Shortcode parameter to template
- Separating Custom Template logic
- Can not get shortcode content in function
- How to add stylesheets only to pages with specific shortcode?
- Hide/show content starting in the middle of a paragraph
- What is the best way to enable nested shortcodes?
- Organizing shortcodes. How to display all of them and their attributes?
- Can I strip HTML tags in the “Compare Revisions” screen?
- how do you get the author’s username?
- do_shortcode inside AJAX callback
- shortcode_unautop shortcode not functioning
- Shortcode perfomance solution
- Video embeds work in backend, but are not parsed in frontend
- How can I run shortcode after click with ajax
- Execute shortcode within shortcode
- How get a shortcode working in category description
- shortcode not working and the relation to the_content()
- display shortcodes outside of the_content
- How to prevent tinymce macro from inserting nbsp;?
- Pros and cons of actions over shortcodes
- How to enqueue script based on post category?
- Disable oEmbed for a Single Shortcode or at Least All Internal Links
- How to check if this is the nth instance of a given shortcode in a post
- conditional shortcode not working
- Extending Shortcode attributes
- Shortcode But Without The Equals Sign?
- Shortcode output is screwed up when arrow symbol “
- How best to apply do_shortcode in media.php for captions
- shortcodes between square and curly brackets
- Searching in shortcode contents
- Applying filters to the_content() to separate content if any `add_shortcode()` is found?
- Wp_localize_script from Shortcode [closed]
- Localization inside shortcode not working
- How to Get a part of URL and put in shortcode?
- shortcode get thumbnail size
- Shortcodes Keep Wrapping in
- If you add a shortcode programmatically, but the code isn’t viewed on that request, is it still executed?
- Problem with using custom shortcode with ACF WYSIWYG field
- Preserve shortcode content formatting
- Populate shortcodes with table data and get next row
- Running shortcode with variable that is modified
- Reloading a Mediaelement audio player
- Shortcode is not processed when added to option field using wp_editor
- How to apply an ID to Shortcode Embedded iframe
- Adding Shortcode Values to wp_head
- Shortcodes: closing shortcode not being processed
- Retrieving post excerpt as a shortcode
- Using $this from child class inside shortcode function
- Insert PHP code via shortcode?
- What is the correct syntax to append a URL using a shortcode for an iframe?
- Shortcodes in RSS excerpts
- How to trace shortcode to its functionality
- If else with shortcodes
- enqueue script with get_shortcode_regex
- How to get_post_meta in a shortcode in excerpt on archive pages
- WordPress upgrade adding additional quote marks to shortcode output
- How to build a shortcode for tabs
- Creating tabs shortcode
- SImple Example To Update User Info From Front End [duplicate]
- get_posts not working on homepage?
- ACF repeater + group shortcode
- Custom shortcode skips every 2nd shortcode
- Wrap template code with shortcodes
- my form does not insert any data in the database
- How to cache a custom API call?
- Can Someone Help me to Correct my shortcode for displaying a category?
- Shortcode custom query not passing value
- How to create custom variables in wordpress
- How to use Shortcode from one WordPress page in another WordPress page?
- Unknow shortcode read on display site
- Onclick want to call shortcode in wordpress
- Working with Contact Form 7 pipes
- How to disable cache for the content returned by a shortcode
- Hide shortcodes content from the excerpt?
- WordPress Server Time not changing/displaying correctly
- Can we create a shorcode to move next page?
- launch a shortcode from a link
- how to add acf value to other plugins shortcode?
- Only execute specific shortcodes
- Trying to echo out custom field inside shortcode?
- Custom shortcode that writes to file
- About redundant code when I use shortcode to output the HTML from a variable
- how to show last 5 images from the one post gallery
- Add JavaScript in footer if shortcode used in page [duplicate]
- Is there a way I can return terms by name using a shortcode?
- Shortcode Output Always Before Content [duplicate]
- How i make a shortcode from this code
- Shortcode Attributes – post__not_in array
- Create a shortcode to display the “the_content ()” in my post [closed]
- filter custom field with checkboxes and show it with one shortcode
- How to add button to WYSIWYG to insert shortcode with params (filled in system popup)?
- Want to call shortcode after every blog post title automatically
- add a meta value to the shortcode twice