• Resolved Divdeep Singh

    (@divdeepsingh1)


    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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Paul Ryan

    (@figureone)

    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

    (@divdeepsingh1)

    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

    (@figureone)

    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.