stevenr999 (January 16th, 2017)
add_action( 'after_setup_theme', 'my_shc_custom_code', 20 );
function my_shc_custom_code() {
class CP_SHC_PageTemplater_Custom extends CP_SHC_PageTemplater {
public function __construct() {
add_filter( 'theme_page_templates', array( $this, 'page_templates' ), 10 );
}
public function page_templates( $post_templates ) {
$instance = self::get_instance();
$post_templates = array_merge( $post_templates, $instance->templates );
return $post_templates;
}
}
new CP_SHC_PageTemplater_Custom;
}
stevenr999 (January 16th, 2017)
There are currently 1 users browsing this thread. (0 members and 1 guests)