Thanks for the kind words!
In a recent update I added a deep nesting check to prevent circular loops. Advanced users can override this behavior by hooking into the insert_pages_apply_nesting_check filter. See the v2.4 notes in the changelog:
https://ww.wp.xz.cn/plugins/insert-pages/changelog/
And here’s where it’s at in the code base:
https://bitbucket.org/figureone/insert-pages/src/b9d4396b955e8ec4b75dc018728e1f9782aeaca2/insert-pages.php?at=master#cl-117
Hope that helps! Reopen this if you have more questions.
Hi!
I would like to add deep nesting.
I see here a solution.
Is there a way to do it with an option in the short-code?
Or, if the above is the only solution… where should I insert this code and how can I make sure that it will work after new versions of the plugin, the template or WP itself?
Thanks a lot… for this great plugin!
Tamas
You can place the following in your theme’s functions.php file to disable the deep nesting check:
function your_theme_init() {
// Disable nesting check to allow inserted pages within inserted pages.
add_filter( 'insert_pages_apply_nesting_check', function ( $should_apply ) { return false; } );
}
add_action( 'init', 'your_theme_init' );
This hook will always work in future versions of Insert Pages; the only thing you need to worry about is if you overwrite the functions.php file in your theme, then you’d just need to add the code again.
In the future I might make this an option in the shortcode itself.
Thank you, Paul!
I have added it, as you described it… and YES, it WORKS!
Great!
Tamas
p.s.
I am going to post another issue…