Hello, I have a lot of errors Fatal error: Uncaught TypeError: Argument 3
due to this: at line 68 of the code there is a call to get_query_template( ‘page’, $new_template ) but in my case $new_template is a string only and not an array.
I added a line to ensure that $new_Template is an array and this solve this error
67 $new_template = get_post_meta( $id, ‘_wp_page_template’, true );
ADDED LINE if ($new_template && !is_array($new_template)) $new_template = array($new_template);
68 if ( $new_template && file_exists(get_query_template( ‘page’, $new_template )) ) :
I hope this will help other users