Support » Plugin: Insert Pages » shortcode in nested page ignored

  • Resolved mtissington


    I have a nested page shortcode and I’m pulling in only the content (I’ve tried all)
    And any shotcodes (for other plugins) are ignored in the nested page content.

    How can I also get any shortcodes in the nested page to be expanded first?

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


    You’ll need to turn off the nesting check to allow this (it’s there to prevent accidentally creating infinite loops, so be aware of that once you turn it off):

    where do we need to turn off that piece of code?

    I tried inserting it in functions.php but nothing changed. My nested posts are still not showing correctly.

    Plugin Author Paul Ryan


    A couple other reasons that shortcodes wouldn’t be expanded (or the_content filter is not run) in an inserted page:
    * You’re inserting a page inline; inline inserts use the <span> tag as a wrapper, and it’s invalid to next block elements in inline elements, so we don’t want wpautop() running.
    * You have Jetpack installed with Sharing enabled; Sharing conflicts with Insert Pages because it expects the_content and the_excerpt filters to only run once, so we can’t run them again in the inserted page.

    Other than that, if you typed the code correctly, disabling the nesting check should work.


    I used to insert in the function.php file of the theme (Spacious) the code (and it used to work fine):

        // ****START******** for Insert Pages plugin
    function spacious_init() {
        // Disable nesting check to allow inserted pages within inserted pages.
        add_filter( 'insert_pages_apply_nesting_check', '__return_false' );
    add_action( 'init', 'spacious_init' );
        // ****END******** for Insert Pages plugin

    When I want to add this code I get an error message:

    Your PHP code changes were rolled back due to an error on line 70 of file wp-content/themes/spacious/functions.php. Please fix and try saving again.
    syntax error, unexpected ‘ ‘ (T_STRING)

    Please, help me, how to make embedded pages displayed.

    Thanks a lot!


Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.