Within the last week, the homepage of this site stopped displaying as a single column and began displaying two columns.
Looking at the page from the administration dashboard, I see that the TEMPLATES dropdown is not appearing. So the template cannot be be set back to HOMEPAGE.
Going to APPEARANCE > THEMES, I get the following message:
Broken Themes
The following themes are installed but incomplete.
Name
Storefront Child Theme URI: https://www.woothemes.com/storefront Description: Storefront Child Theme Author: WooThemes Author URI: https://www.woothemes.com Template: storefront Version: 1.0.0 License: GNU General Public License v2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready Text Domain: storefront-child
Description
Template is missing. Standalone themes need to have a index.php template file. Child themes need to have a Template header in the style.css stylesheet.
(I note that TEMPLATE: STOREFRONT appears at the beginning of the child theme’s STYLE.CSS file.)
My other site, which also uses a STOREFRONT child theme, does not display this behavior.
This site uses:
STOREFRONT 3.7.0
WORDPRESS 5.7.2
WOOCOMMERCE 5.4.1
What am I missing? If there is a thorough guide to the Homepage Template somewhere, please direct me to it.
I’m trying to create a homepage that looks much like the one you’d see as the landing page at carpentersherbal.ca. Trouble is, the featured image you can see just under the header doesn’t show up in my editor. So it’s there on the page, but the Featured Image box on the page editor is blank – there is no featured image set! So I’ve created the page I want (more or less) without any clear way of re-creating that result.
I’m running Storefront with WooCommerce 3.2.6. Let me know what other info is required.
Thanks.
]]>How do I get rid of that?
]]>Expected result
It should be possible to use functions.php in a custom theme to override the amount of products that should be displayed on the start page.
Additional info
In inc/storefront-template-functions.php, it is possible to hook into storefront_product_categories
by applying the storefront_product_categories_shortcode_args
filter and thereby setting the number of products, e.g:
add_filter('storefront_product_categories_shortcode_args', 'startpage_categories_limit' );
function startpage_categories_limit( $args ) {
$args['number'] = 4;
return $args;
}
But it is not possible to do this with storefront_recent_products
.
Patch
--- inc/storefront-template-functions.php-original 2017-12-03 16:15:08.000000000 +0100
+++ inc/storefront-template-functions.php 2017-12-03 16:20:58.000000000 +0100
@@ -609,10 +609,10 @@
'title' => __( 'New In', 'storefront' ),
) );
- $shortcode_content = storefront_do_shortcode( 'recent_products', array(
+ $shortcode_content = storefront_do_shortcode( 'recent_products', apply_filters( 'storefront_recent_products_shortcode_args', array(
'per_page' => intval( $args['limit'] ),
'columns' => intval( $args['columns'] ),
- ) );
+ ) ) );
/**
* Only display the section if the shortcode returns products
]]>First, all my widgets disappeared. It turned out they weren’t gone, they had just been moved to the Inactive Widgets area. Before you do this update, make a record of where all your widgets go in case this happens, so you can more easily move them back up into their appropriate locations in Appearance -> Widgets.
Second, there is a pop-up once you move off the updates screen that asks you to add the Homepage Template. If you do so, the Homepage Template will automatically be applied to your home page, and you may find that the sidebar is gone and all the headings/text are center-aligned. You can fix it by editing the page (if you have a static home page) and switching back to the default template.
]]>