• losrack

    (@carlos-jaramillo)


    Hi,

    I am reducing the number of plugins by coding some stuff. I have had some luck with a bunch of them… but…

    I have HOMEPAGE CONTROL plugin, I use it cause I can hide a bunch of things that I don’t need.

    It hides:

    1 product categories
    2 recent products
    3 featured products
    4 popular products
    5 on sale products

    The thing is that I would love to do it without this plugin, since it slows the site a bit.

    site: 1-diez.com

    Thanks for any help

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter losrack

    (@carlos-jaramillo)

    … Forgot to mention I am using the full width template.

    This plugin is tiny and shouldn’t slow your site noticeably.

    However, you can remove those sections with a snippet like;

    add_action( 'init', 'jk_edit_storefront_homepage' );
    function jk_edit_storefront_homepage() {
    remove_action( 'homepage', 'storefront_homepage_content',   10 );
    remove_action( 'homepage', 'storefront_product_categories', 20 );
    remove_action( 'homepage', 'storefront_recent_products',    30 );
    remove_action( 'homepage', 'storefront_featured_products',  40 );
    remove_action( 'homepage', 'storefront_popular_products',   50 );
    remove_action( 'homepage', 'storefront_on_sale_products',   60 );
    }

    That’d remove everything. Just pick and choose the ones you want to leave.

    Cheers

    Thread Starter losrack

    (@carlos-jaramillo)

    Thanks James,

    I guess this goes on child functions.php

    Again thanks !!!!

    Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hey Carlos,

    Yeah place the code that James gave you in your child theme functions.php file ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘storefront – show only main content’ is closed to new replies.