Custom Post Template
Doesn't work with a Child Theme (6 posts)

  1. ghleor
    Posted 3 years ago #

    Thanks for this plugin. It is just that I need!!
    The issue I've found is that it can't read post templates from a child theme, because it doesn't find them.
    So, I have to work on parent theme, is there any way to solve this?
    I would like to work with childtheme because It is safest.
    Thank you very much!


  2. 082net
    Posted 3 years ago #

    Add lines below to custom-post-templates.php:176 (version 1.5)

    $post_templates = array();
    		$files = (array) $theme->get_files( 'php', 1 );
    		// MOD START
    		if ( $theme->parent() )
    			$files += (array) $theme->parent()->get_files( 'php', 1 );
    		// MOD END
  3. ghleor
    Posted 3 years ago #

    Thank you very much!

  4. Mark Jansen
    Posted 3 years ago #

    I have the same issue. The fix 082net posted works, but is there a way to fix this in the theme? If I ever update this plugin, chances are I will lose this fix.

  5. indole
    Posted 3 years ago #

    You could submit a patch : )

  6. Social Response
    Posted 3 years ago #

    FYI Mine works fine in a child theme, I think it must depend on the Theme

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Template
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.