First, change this:
include TEMPLATEPATH . '/extras/shortcodes.php';
…to this:
include ( TEMPLATEPATH . '/extras/shortcodes.php' );
Second, change TEMPLATEPATH
to get_template_directory()
:
include ( get_template_directory() . '/extras/shortcodes.php' );
(The TEMPLATEPATH
and STYLESHEETPATH
globals are going away eventually.)
Third, make sure you namespace your function names properly. Function names “alertBox()” and “infoBox()” are far too generic.
Beyond that, we probably need to see your error messages.
Related Posts:
- How can I view my readme.txt file to include inline images, videos…prior to submitting a New Plugin for review by wordpress.org?
- “Site Offline” message can’t be disabled
- Divert traffic when site down
- Name and password development/offline mode plugin
- Add php code inside the function add_shortcode in functions.php WordPress
- Why might a plugin’s ‘do_shortcode’ not work in an AJAX request?
- Insert Custom HTML After Shortcode
- Is there a way to add another row to the tinyMCE kitchen sink toggle?
- Combining shortcode and get_template_part
- Shortcode output always showing at top of page
- How to detect if a Shortcode is being called on a page?
- How to get current page title inside a page itself in a shortcode and in page content
- shortcode inside another shortcode
- Enabling shortcodes for custom fields
- Need MySQL Query or WP-CLI command to updates old URLs in Shortcodes [closed]
- Including javascript for a shortcode
- shortcode to create dynamic dropdown box form shortcode attributes
- Custom shortcode in widget forced to top of widget
- conditional shortcode not working
- How do I add my own custom shortcodes?
- Remove images from get_the_excerpt
- Can’t seem to get [shortcode]s to work
- change plugin shortcode function [closed]
- the_title() & the_content() are retrieving Post details inside a Page, after calling a shortcode
- What is rich_editing?
- nested Shortcode doesn’t work
- Slow page loading when using a simple shortcode on the same page multiple times
- TinyMCE get selected text and underlying HTML
- Remove and restore one shortcode
- Wrap each shortcode in array to div
- Rewriting WordPress Gallery Shortcode with Bootstrap Carousel
- other shortcodes in Contact form 7 MAILS [closed]
- Can I the caption shortcode to set caption to a data attribute, and with the image’s alignment intact?
- Custom Post Type Loop within Shortcode
- Display a post by ID attribute with shortcode
- Shortcode API: How to get name that matched shortcode RegEx?
- Creating a shortcode based on users preferences
- Get a post’s thumbnail url or display default image in shortcode
- basic shortcode – Why 1st paragraph not wrapped in p tag, but 2nd is
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Convert HTML Script to Shortcode [closed]
- Registration Form Shortcode
- Include tags in the body of a post
- WordPress function not being called from jQuery method
- How can I custom order the product display?
- Remove shortcodes that are different (but same pattern) in each post
- Place a URL parameter value inside a WordPress short code
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- How to filter backend post list showing only posts having a shortcode
- Shortcode for latest -not expired- posts
- Conditionally Loading JavaScript/CSS for Shortcodes
- Add JS in footer via shortcode?
- Shortcode not getting replaced
- Unable to process php via shortcode
- How to display the categories on page using shortcode?
- Shortcode Attributes to Return different $_POST
- WordPress Shortcode / Only works in classic editor, gutenberg error / invalid json response
- Cant display an image via PHP in wordpress
- Do shortcode in template file
- Pass instance number to shortcode child
- do_shortcode close
- Pass a comma separated shortcode attribute to a function
- Which is a better practice when writing shortcodes: pack lots of configuration parameters or just give an id?
- Set document title through shortcode plugin
- Using Shorcodes in Sharing Preview and Notifications Title from Post Title
- Display “no post” message
- Shortcode with loop stacks output
- Show the parent taxonomy by creating shortcode in woocommerce?
- Get Shortcode output to database for static post_content
- If statement shortcode
- update_metadata() appends shortcode data for every page refresh
- Multiple Arrays for Custom Post Query using Boostrap accordions and ACF repeater fields
- Gallery shortcode is empty but magically creates a gallery
- WP Plugin CSS not being applied to page
- Function not receiving string from shortcode
- How to avoid one code multiple times instead do that through some function? Shortcode, but I think shortcode is not used in main theme’s core files?
- Shortcode appeared twice on page, one time before content, one time where it’s really called
- Enable shortcodes on custom post type
- shortcode function outputs multiple anchor tags
- Find all strings between an enclosing shortcode
- Plugin Error on activating
- Limit the number of successful logins
- Inserting a variable into a shortcode inside php
- Problem in outputting shortcode
- Using shortcodes that wrap around code
- Having Trouble Running Query From Shortcode Using Tribe’s Events Plugin
- Shortcode for Admin Theme Option?
- How to load a plugin when doing an Ajax call? [duplicate]
- How can I put a custom field as the link of a button shortcode?
- Clarify: Enqueueing scripts within shortcode only loads in footer?
- What makes a placeholder resizable in Tinymce?
- Multi-part form and wp_redirect()
- Problem using explode inside add_shortcode() callback funciton [closed]
- Shortcodes not outputting in correct divs
- get value from post to sidebar
- Creating Features List in WordPress Post
- I am experiencing difficulty fulfilling client request
- Problem with shortcode
- 3 shortcodes 2 won’t render [closed]
- Undefined Function Fatal Error with Shortcode [closed]