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
- Creating a custom rebrandly link using a wordpress shortcode
- How to login to WordPress Offline?
- Using WordPress shortcode in a title
- Add php code inside the function add_shortcode in functions.php WordPress
- Where to put my code: plugin or functions.php?
- convert it into short code & explan how? [closed]
- Enqueue Scripts / Styles when shortcode is present
- Conditionally Loading JavaScript/CSS for Shortcodes
- How to add a shortcode button to the TinyMCE editor?
- What does extract( shortcode_atts( array( do?
- Stop WordPress automatically adding tags to post content
- apply_filters(‘the_content’, $content) vs do_shortcode($content)
- Split Content and Gallery
- Solution to render Shortcodes in Admin Editor
- How do I escape a ‘]’ in a short code?
- Pass boolean value in shortcode
- Show shortcode without executing it
- How to use other shortcodes inside Contact form 7- forms? [closed]
- Shortcode always displaying at the top of the page
- How to customise the output of the WP image gallery shortcode from a plugin?
- How to manually fix the WordPress gallery code using PHP in functions.php?
- PHP error with shortcode handler from a class
- Redirect function inside a Shortcode
- How to create a shortcode with 1 parameter (atts)
- do_shortcode() within Admin Page
- How to include code only on specific pages?
- Custom media upload content for inserting custom post shortcode
- Return HTML Template Page with PHP Function
- how to show the syntax of a shortcode
- Custom shortcode being executed when saving page in wp-admin
- Add self-closing shortcode button to TinyMCE in WP 4.6
- Change appearance of shortcode text inside editor
- current_shortcode() – detect currently used shortcode
- shortcodes output before content [duplicate]
- WordPress plugin shortcode not working
- How to get shortcode’s input values inside a filter?
- How to add stylesheets only to pages with specific shortcode?
- Use AJAX in shortcode
- Why might a plugin’s ‘do_shortcode’ not work in an AJAX request?
- Filter specific shortcode output?
- Using get_option() in JavaScript
- Shortcode empty attribute
- How does a shortcode work?
- Shortcode outputs at the top of the_content
- the_excerpt and shortcodes
- Using wp_editor in shortcode
- Remove wpautop from shortcode content / remove whitespace in buffering
- Encode text string being appended as query to URL [closed]
- Optimize shortcode callbacks
- Get current post id witout passing in shortcode
- Create a shortcode to display custom post types with a specific taxonomy
- Why are you using add_action for shortcode?
- How to get URL param to shortcode?
- WordPress removing tags?
- Creating Multiple wp_localize_script for Shortcode?
- How to add multiple buttons to TinyMCE?
- How to have different captions for same image, for galleries?
- Check if post/page has gallery?
- How to check if a shortcode exists?
- Get first video from the post (both embed and video shortcodes)
- Get shortcode name from within it’s callback function? [duplicate]
- Include PHP file in Content using [shortcode]
- Checking if an attribute exists in a shortcode
- Featured image shortcode
- Wordspress add into my javascripts
- How to paginate wordpress [gallery] shortcode?
- Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
- How do I create a Shortcode that returns text if domain is .com, not .co.uk
- Insert Custom HTML After Shortcode
- Using preg_replace to separate gallery from the_content?
- Is there a way to add another row to the tinyMCE kitchen sink toggle?
- Remove specific shortcode from get_the_content()
- How to display the site name in a WordPress page, or post
- Hide/show content starting in the middle of a paragraph
- Combining shortcode and get_template_part
- How do I use Shortcodes inside of HTML tags?
- How can I put a wp_redirect into a shortcode?
- Escaping quotes from shortcode attributes
- do_shortcode() doesn’t do shortcodes ;)
- Run visual composer code in php page
- how to include other plugins css files in a shortcode?
- short code output too early
- Shortcode in shortcode: How to append variable?
- add_filter and changing output captions of image gallery
- Is there a way to parse shortcodes in PHP?
- Remove wptexturize from a shortcode?
- How would I create a plugin for my shortcodes?
- How can i put an array as variable in shortcode_atts?
- How to return loop contents
- Allow Shortcode in Theme Customizer
- Autoembeds don’t work with paragraphs
- Table of Contents with a shortcode
- Display custom post type with shortcode
- Create custom [sourcecode] shortcode, the right way?
- TED talks shortcode not working
- Add custom shortcode button to Editor