| @@ -14,8 +14,9 @@ | ||
| 14 | 14 | add_filter( 'template_include', 'pluginname_load_template', 99 ); |
| 15 | 15 | function pluginname_load_template( $template ) { |
| 16 | 16 | |
| 17 | 17 | global $post; |
| 18 | + | |
| 18 | 19 | if(isset($post)){ |
| 19 | 20 | |
| 20 | 21 | $canvas_template_slug = 'canvas.php'; |
| 21 | 22 | $full_width_template_slug = 'full-width.php'; |
| @@ -29,8 +30,7 @@ | ||
| 29 | 30 | return BLOCKSPARE_PLUGIN_DIR . 'inc/page-templates/templates/' . $full_width_template_slug; |
| 30 | 31 | } |
| 31 | 32 | |
| 32 | 33 | } |
| 33 | - | |
| 34 | 34 | return $template; |
| 35 | 35 | |
| 36 | 36 | } |