Are your shortcodes setup correctly? This usually means that your shortcode handling is echoing the shortcode content instead of returning it as a string.
For your case, while you are including a file in your shortcode, I doubt that you have the file setup to return the output instead of echo’ing it.
Try this instead:
function free_ms_cms( $atts, $content = null ) {
$free_ms = TEMPLATEPATH . '/get-free-ms.php';
ob_start(); //start an output buffer to capture any output
include($free_ms);
return ob_get_clean(); //return the current buffer and clear it
}
add_shortcode( 'free-ms', 'free_ms_cms' );
Related Posts:
- wp_redirect() – headers already sent
- The the_post_thumbnail without srcset?
- after_setup_theme always runs
- Enqueue Stylesheets After Theme’s “rtl.css”
- What WP folder can I use to write files to?
- How to add default images for custom backgrounds?
- How to call the_excerpt() with tags or the_content() as an excerpt?
- Display a different theme for not logged-in users
- how to test a theme upgrade
- Custom Theme: The active theme is broken. Reverting to the default theme
- comment_form() generates the wrong action url
- How to set path with WP_Filesystem and ftp base / chroot
- Customize comment list markup
- Have WP Theme update from Git Repository
- A two column loop with one lead post
- How to Modify a Widgets UL and/or LI Classes
- new theme permissions don’t allow me to edit
- Getting Permalink within the loop
- Allow users to add custom functions to wordpress theme
- What page should I use for a contact form?
- Can a child theme based on Starker theme be released as free to use theme for public use?
- Changing order title and featured image in blog post (Astra theme)
- wordpress custom theme import and export options for sample data [closed]
- How to hook CSS file according to theme selection in the customizer section
- Link won’t show using the_permalink();
- What program can I use to preview my wordpress site?
- How exactly *does* unit testing work for themes?
- How to remove a file included in parent theme with locate_template() via child theme?
- Can’t override template file in child theme
- wp_nav_menu add something before closing container and after last list item
- qTranslate with my own theme and settings
- Make logo dynamic in wordpress
- Do i need to keep all the default WP templates files in a theme?
- Create a new page in WordPress theme
- where to split off footer.php
- How to show user online status on their posts?
- What is the correct way of getting parent styles from child theme?
- How to display all subpages and short by year
- how to setup custom content structures
- WordPress Filtering Custom Post Type by Metadata and Search Heirachy
- How to Call pages from a Options Panel
- Nested comments in WordPress theme
- Featured Image meta box not showing up
- Why does WordPress append numbers to page slugs sometimes? How to reliably style based on page
- WordPress Template Part in iFrame
- Can I add an icon & function to the “Upload/Insert” toolbar at the top of the content editor?
- underscores use of the article element on the page template
- Ideal inline dynamic CSS injection
- How to create and populate with few links a menu in child theme functions.php?
- Plugin does not work in custom theme
- Why tags are displayed bellow the content and not inside
- What’s the best way to create a new design for other pages?
- Consequences if using PHP include TEMPLATEPATH?
- Adding a gallery to my first theme
- Making custom woo themes
- Headless WordPress + Vue.js on the same server
- Previous and Next links not populating, have I missed something?
- not getting API setting saved confirmation message after update on option page
- Single.php the_excerpt loads same as the_content not loading read more line
- Where to put custom page templates in theme?
- Is there a way to retrieve the calling template part?
- How to fix WordPress images not showing up in local hosted XAMPP server?
- WP_Query not getting all posts, just tagged posts
- how to hide home nav link in wordpress
- Converting a theme to a child theme in a network
- .current_page_ancestor broken in Twenty Eleven
- Calling a WP Plugin Function’s Variable in Theme Template [duplicate]
- WordPress theme header.php should I add title meta?
- Why excerpt hook not working inside ajax function?
- Help with Core Mods
- Problems with cart and pages on _s theme
- Local variable name in setup_postdata()
- Creating a Single Page Theme correctly
- Custom post type query with pagination doesn’t work
- Child theme menu not appearing in Twenty Seventeen
- Edit Product Archive design for Woo theme
- How do I remove header/page-title image in farvis theme? [closed]
- how to edit woocommerce checkout page
- Necessary css classes to be included in theme stylesheet
- How to link post image to post link?
- Setting a fluid content width
- get_the_excerpt() removes all p tags in page!
- jQuery conflict in WordPress, works fine in HTML
- Including some variables in function.php and echo them is several place of theme is not working
- How to migrate the menu from the site on my own theme in WordPress?
- Why is including all your files within a theme folder important?
- Change default options on attachment page
- FitVid not working for iframes on particular theme install
- How to create multiple sidebar areas with a forloop and register_sidebars?
- Make theme editor to show all theme’s files
- can’t add EVENT LISTENER to a element
- add_action works outside condition but not inside it
- Bootstrap isn’t called into my WordPress theme
- Jquery Ui Tabs not working
- Adding a new layout for genesis
- Bootstrap 4 mobile menu not working for WordPress Development
- How to make it so I can “use” template parts in (classic/full) site editor
- How do I send out an update for my custom wordpress theme?
- custom wordpress theme blog page always not showing the last two pages of the articles
- Cart button not working on mobile version [closed]