• I have storefront set up to use a static front page (homepage). When I try and enter text or shortcodes on this page I get nothing. Wigets, menus, recent items etc.. all display fine. Am I doing something wrong?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hey,

    Hard to say without a log in I’m afraid. This is standard WordPress functionality though and should work fine. Perhaps you’re just editing the wrong page?

    Thanks

    Thread Starter metice

    (@metice)

    I’ve found the problem; the Homepage Control plugin is preventing anything being added on that page. I tested it with a couple of other themes and it seems to be okay so it looks like a conflict with the Storefront theme?

    The plugin isn’t that essential but I can’t find the code I need to change to edit/delete the components manually i.e featured products, recent, categories etc.. Any ideas where I need to look?

    I’d also like the text that I enter to appear after these components – at the moment it appears before. Not sure if this is a Storefront issue but any suggestions would be most appreciated.

    Many thanks

    Hmm, I’ve never seen that issue. I’m running Storefront and Homepage Control locally with no issues. I’d need a log in to investigate this I’m afraid. Are you certain that you didn’t toggle off the homepage content in the Homepage Control settings?

    I assume you’re using the latest version of everything as well?

    Thread Starter metice

    (@metice)

    Hi James, I checked the theme version and there was an update. Everything seems to be working fine with the update. Sorry to waste your time with this!

    Just one small query – I want to change the default headings (recent products, featured products) but I can’t find the file I need to edit. Any idea where it is?

    Thanks

    Glad it’s working now!

    There are a number of ways to do change the homepage section titles via your child theme / customisation plugin.

    You can filter the arguments that control the title, number of products displayed, etc. Here are the filters you need:

    storefront_custom_header_args
    storefront_product_categories_args
    storefront_featured_products_args
    storefront_recent_products_args
    storefront_popular_products_args
    storefront_on_sale_products_args

    You can see more in this file: https://github.com/woothemes/storefront/blob/master/inc/structure/template-tags.php

    Another option is just to plug each function by copy pasting it into your child theme / customisation plugin. For example to change the product categories title you’d just paste this:

    function storefront_product_categories( $args ) {
    		if ( is_woocommerce_activated() ) {
    			$args = apply_filters( 'storefront_product_categories_args', array(
    				'limit' 			=> 3,
    				'columns' 			=> 3,
    				'child_categories' 	=> 0,
    				'orderby' 			=> 'name',
    				'title'				=> __( 'A new title here', 'storefront' ), // <-- new title
    				) );
    			echo '<section class="storefront-product-section storefront-product-categories">';
    			do_action( 'storefront_homepage_before_product_categories' );
    			echo '<h2 class="section-title">' . esc_attr( $args['title'] ) . '</h2>';
    			echo do_shortcode( '[product_categories number="' . intval( $args['limit'] ) . '" columns="' . intval( $args['columns'] ) . '" orderby="' . esc_attr( $args['orderby'] ) . '" parent="' . esc_attr( $args['child_categories'] ) . '"]' );
    			do_action( 'storefront_homepage_after_product_categories' );
    			echo '</section>';
    		}
    	}

    The easiest solution however would be to install the Storefront WooCommerce Customiser extension which lets you do this and much more ??

    Thread Starter metice

    (@metice)

    Thanks James, that’s perfect

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Unable to add content to homepage’ is closed to new replies.