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):
https://github.com/uhm-coe/insert-pages/blob/master/readme.txt#L282-L287
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.
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.
Hi!
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!
Tamas