WordPress.org

Support

Support » Plugins and Hacks » WooCommerce » [Resolved] [Plugin: WooCommerce] Customising the shop base page

[Resolved] [Plugin: WooCommerce] Customising the shop base page

  • What’s the easiest way to customise the shop base page? I can’t find a template file for it and need to change a few things such a widget displaying that shouldn’t, removing the dropdown sort option and the general style.

    It’d be nice to change it so that the title isn’t the ‘Site Title – Tagline’.

    Thanks

Viewing 15 replies - 1 through 15 (of 18 total)
  • gaaah didn’t realise it was an archive! found the template file.

    if you want to remove the dropdown sort option you shall open your theme functions.php and add following line:
    remove_action( 'woocommerce_pagination', 'woocommerce_catalog_ordering', 20 );

    in general, is it possible eliminate elements from your woocommerce design using a remove_action.

    In woocommerce plugin is a file called woocommerce-hooks.php inside this file is listed all elements of the various elements of the wep-shop-pages, which all can be removed this way.

    Just find line add_action line you want to remove cope the line into functions.php and overwrite “add” with “remove”.

    I have created a woocommerce webshop using a standard theme.
    I preferred to work with Weaver ii because of its flexibility, but this was actual a hindrance to achieve my goal, so I shifted to TwentyEleven. But also this theme had some issues especially with the sidebar widgets during the process.

    So once again I changed theme. Twentyten makes no problem with widgets. Instead I modified the CSS to the result I wanted.
    (I have now renamed the theme, so it wont disappear when updating.)

    @pandaj

    You mentioned archive/template file for editing the shop’s base page’s title.

    Can you elaborate on how you did that exactly as I’d love to find the way to customize the page’s <title>.

    Thanks,
    Chris

    @cbigler I added a line to echo the title at the top of the ‘archive-product.php’ page which seemed to work, just above the header.

    echo "<title>SHOP</title>";
    get_header('shop'); ?>

    You did that with a Woocommerce theme?

    With the WPFlexiShopTwo theme, I edited /wp-content/themes/wpflexishoptwo/core/frontend/head.php to have the following:
    // ————————————–
    elseif ( is_post_type_archive(‘product’) ) {
    $title = get_post_meta(woocommerce_get_page_id(‘catalog’), ‘seo_title’, true);
    }
    // ————————————–

    That works on that theme. My problem is how to do it on the twentytwelve default theme?

    CHris

    No I did it with my own theme, referring to: http://wcdocs.woothemes.com/codex/template-structure/

    I think that’s what I need to do – build my own theme actually. I’m great with HTML, etc … how long did it take you to build your theme? I have almost all of the HTML done, so I’m it wouldn’t be more than 1 to 2 weeks.

    Got it … thank you for that; it’s what I need it to be now. Thanks again! Chris

    On the twenty twelve theme, that doesn’t produce the correct result as it places a <title> tag at the very beginning of the (Woocommerce) base shop page … before all other HTML.

    That’s incorrect; you end up with 2 <title> tags on your page, as well as invalid HTML.

    Instead, if you have Yoast’s WordPress SEO plugin installed … do this:

    1. Visit http://yourdomain.com/wp-admin/admin.php?page=wpseo_titles#top#post_types
    2. At bottom of that page in the “Custom Post Type Archives” section, enter your desired title in the “Title” field.
      • Example: Vanilla Ice Cream

    —————
    DONE

    @cbigler I tried that with no success. But here is my current work around.

    Inside header.php I replaced my <title> tag with:
    <title><?php if (is_shop()){ echo "Shop Title Here!!! Yahooo";} else{the_title();}?></title>

    Cheers

    @matt … On the Abundance theme my header.php has (the typical) title as:
    <title><?php is_home() ? bloginfo('description') : wp_title(''); ?></title>

    ^ That’s working

    I like your solution better actually … I’d rather it be hard coded like that, so thank you for sharing the code!

    @cbigler

    I try not to hard code things too much, but since I manage the site and needed this up quickly, it works.

    Cheers!

    @matt … Quick update …

    I replaced my header.php’s <title> code with what you’re using, but take a look at your Woocommerce categories and see if it displays the correct title. It didn’t for me, so I combined ours and it works as it should.

    Here’s what I have:
    <title><?php if (is_shop()){ echo "Shop Title Here!!! Yahooo";} else{wp_title('');}?></title>
    ————————————
    My particular set up is:
    – Abundance theme
    – Yoast’s WordPress SEO
    – Code sample above for <title>

    I don’t have categories listed or visible by search as we are running an interesting setup.

    I haven’t checked but is wp_title(”) compatible with Yoast SEO? I thought that was always supposted to be the_title()?

    It was a quick copy/paste while I ssh’d in, saved and voila … worked. 🙂

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Resolved] [Plugin: WooCommerce] Customising the shop base page’ is closed to new replies.
Skip to toolbar