Title: Problem in do_shortcode
Last modified: August 31, 2016

---

# Problem in do_shortcode

 *  Resolved [Divdeep Singh](https://wordpress.org/support/users/divdeepsingh1/)
 * (@divdeepsingh1)
 * [10 years ago](https://wordpress.org/support/topic/problem-in-do_shortcode/)
 * Hi,
 * I am using this plugin to call another page through template.
 * I have created the do_shortcode from the shortcode [insert page=’dummy1′ display
   =’content’]
    Where dummy1 is my page name do_shortcode created is
 * <?php
    echo do_shortcode(“[insert page=’dummy1′ display=’content’]”); ?>
 * When i call the shortcode [insert page=’dummy1′ display=’content’] directly then
   the result is correct, but when i call the shortcode through template then the
   result is different.
    Please help!
 * Thanks
    Divdeep Singh
 * [https://wordpress.org/plugins/insert-pages/](https://wordpress.org/plugins/insert-pages/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * (@figureone)
 * [10 years ago](https://wordpress.org/support/topic/problem-in-do_shortcode/#post-7394705)
 * Hm, I can’t think of a reason why the `do_shortcode()` call wouldn’t be working
   in your template. Your code sample looks correct. What does it output instead?
   Are you nesting shortcodes (like an inserted page has another insert page shortcode)?
   You can also try changing the insert method at Dashboard > Settings > Insert 
   Pages.
 *  Thread Starter [Divdeep Singh](https://wordpress.org/support/users/divdeepsingh1/)
 * (@divdeepsingh1)
 * [10 years ago](https://wordpress.org/support/topic/problem-in-do_shortcode/#post-7394708)
 * Hi
 * Thanks for the reply
 * When i call the shortcode in template, then my columns get converted into rows.
   Like for example i have created one row with two columns. when i call the shortcode
   into template the result comes up into two rows instead of one.
 * No, i am not using Nested shortcodes.
 *  Plugin Author [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * (@figureone)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/problem-in-do_shortcode/#post-7394747)
 * When you say columns and rows, does that mean you are using table-based markup
   to format everything? It’s possible that the html markup inserted by the plugin(
   wrapper div/span, then the markup for the page content) is being dropped into
   your table rows/cells at a place that’s invalid per the html spec. But I’d need
   more details to confirm that.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Problem in do_shortcode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/insert-pages.svg)
 * [Insert Pages](https://wordpress.org/plugins/insert-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-pages/reviews/)

## Tags

 * [do_shortcode](https://wordpress.org/support/topic-tag/do_shortcode/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * 3 replies
 * 2 participants
 * Last reply from: [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/problem-in-do_shortcode/#post-7394747)
 * Status: resolved