WordPress.org

Ready to get started?Download WordPress

Forums

Q and A Focus Plus FAQ
[BUG] $page_template and child templates (2 posts)

  1. VrijMedia
    Member
    Posted 1 month ago #

    in inc/functions.php:

    if ( file_exists( TEMPLATEPATH . '/single-qafp_faqs.php') ) {
    			$page_template = TEMPLATEPATH . '/single-qafp_faqs.php';
            } elseif ( file_exists( TEMPLATEPATH . '/page.php') ) {
    			$page_template = TEMPLATEPATH . '/page.php';
    		} elseif ( file_exists( TEMPLATEPATH . '/single.php' )) {
    			$page_template = TEMPLATEPATH . '/single.php';
    		} else {
    			$page_template = TEMPLATEPATH . '/index.php';
    		}

    Should be:

    if ( file_exists( get_stylesheet_directory() . '/single-qafp_faqs.php') ) {
    			$page_template = get_stylesheet_directory() . '/single-qafp_faqs.php';
            } elseif ( file_exists( TEMPLATEPATH . '/single-qafp_faqs.php') ) {
    			$page_template = TEMPLATEPATH . '/single-qafp_faqs.php';
            } elseif ( file_exists( get_stylesheet_directory() . '/page.php') ) {
    			$page_template = get_stylesheet_directory() . '/page.php';
            } elseif ( file_exists( TEMPLATEPATH . '/page.php') ) {
    			$page_template = TEMPLATEPATH . '/page.php';
    		} elseif ( file_exists( get_stylesheet_directory() . '/single.php' )) {
    			$page_template = get_stylesheet_directory() . '/single.php';
    		} elseif ( file_exists( TEMPLATEPATH . '/single.php' )) {
    			$page_template = TEMPLATEPATH . '/single.php';
    		} elseif ( file_exists( get_stylesheet_directory() . '/index.php' )) {
    			$page_template = get_stylesheet_directory() . '/index.php';
    		} else {
    			$page_template = TEMPLATEPATH . '/index.php';
    		}

    https://wordpress.org/plugins/q-and-a-focus-plus-faq/

  2. ELsMystERy
    Member
    Plugin Author

    Posted 1 month ago #

    OK... I will fix this in the next update.

Reply

You must log in to post.

About this Plugin

About this Topic