WordPress.org

Forums

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

  1. VrijMedia
    Member
    Posted 12 months 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 11 months ago #

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

Reply

You must log in to post.

About this Plugin

  • Q and A Focus Plus FAQ
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic