Category menu? (4 posts)

  1. dunderhonung
    Posted 3 years ago #

    How can I get a sidebar menu with my categories?

    I would like it to display like this http://www.blueheaven.se/category-menu/


  2. James Koster
    Plugin Author

    Posted 3 years ago #

    Have you tried using the built-in Product Categories widget? ;)

  3. dunderhonung
    Posted 3 years ago #

    no, I havn't how do I use that?

    or, I tried but couldn't get it to work.

    do I have to declare the widget in some way?

  4. dunderhonung
    Posted 3 years ago #

    My file looks like this.

    * The Template for displaying product archives, including the main shop page which is a post type archive.
    * Override this template by copying it to yourtheme/woocommerce/archive-product.php
    * @author WooThemes
    * @package WooCommerce/Templates
    * @version 2.0.0

    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

    get_header('shop'); ?>
    <div id="content" class="coach-page">
    <div id="content-wrapper" class="wrapperSize">

    <div id="contentBox">


    global $woocommerce_loop;

    $woocommerce_loop['loop'] = 0;
    $woocommerce_loop['show_products'] = true;

    if (!isset($woocommerce_loop['columns']) || !$woocommerce_loop['columns']) $woocommerce_loop['columns'] = apply_filters('loop_shop_columns', 4);


    <?php do_action('woocommerce_before_shop_loop'); ?>

    <ul class="products">



    if ($woocommerce_loop['show_products'] && have_posts()) : while (have_posts()) : the_post();

    global $product;

    if (!$product->is_visible()) continue;


    <li class="shop_product <?php if ($woocommerce_loop['loop']%$woocommerce_loop['columns']==0) echo ' last'; if (($woocommerce_loop['loop']-1)%$woocommerce_loop['columns']==0) echo ' first'; ?>">

    <?php do_action('woocommerce_before_shop_loop_item'); ?>


    <?php do_action('woocommerce_before_shop_loop_item_title'); ?>

    <h3><?php the_title(); ?></h3>

    <?php do_action('woocommerce_after_shop_loop_item_title'); ?>

    <button class="product_button" type="button" onclick="window.location.href='<?php the_permalink(); ?>'">INFO</button>


    endwhile; endif;

    if ($woocommerce_loop['loop']=="0") echo '<li class="woocommerce_info">'.__('No products found which match your selection.', 'woocommerce').'';

    <div class="clear"></div>

    <?php do_action('woocommerce_after_shop_loop'); ?>
    <?php get_footer('shop'); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic