Support » Plugin: Goods Catalog » Copy wrapper.php to own template for changing

  • skinpot

    (@skinpot)



    I propose to change code
    /wp-content/plugins/goods-catalog/inc/class.wrapper.php:18

    if ( is_post_type_archive('goods') || is_tax('goods_category') || is_tax('goods_tag') || is_singular('goods') ) {
    		    if (file_exists(GOODS_CATALOG_PLUGIN_TEMPLATES . '/wrapper.php')) {
    		        return GOODS_CATALOG_PLUGIN_TEMPLATES . '/wrapper.php';
    		    }
    		}

    to

       if (file_exists (get_template_directory() . '/wrapper.php')) {
                    // echo 'Current template: ' . get_template_directory() . '/' . $template;
                    require_once (get_template_directory() . '/wrapper.php');
                }
                elseif (file_exists(GOODS_CATALOG_PLUGIN_TEMPLATES . '/wrapper.php')) {
                    return GOODS_CATALOG_PLUGIN_TEMPLATES . '/wrapper.php';
                }

    for ability to copy and change wrapper.php to own theme folder.

  • The topic ‘Copy wrapper.php to own template for changing’ is closed to new replies.