WordPress.org

Forums

WooCommerce - excelling eCommerce
Products/Catelog page displays the Sort option below main content (3 posts)

  1. gstricklind
    Member
    Posted 2 years ago #

    For some reason, the orderby/sort option is placed after the main content/products on the catalog page. For my theme, I've placed a woocommerce.php file in my theme directory as recommended.

    <?php get_header(); ?>
    <section id="main" >
    
        <div class="row">
    
            <?php layout::side( 'left' , $post_id , 'single'); /*left sidebar*/ ?>
    
            <?php woocommerce_breadcrumb(); ?>
            <div class="delimiter"></div>
    
        </div>
    
        <div class="row">
    
            <div id="primary" class="<?php echo tools::primary_class( 0 , 'post', $return_just_class = true ); ?>">
    
            	<?php woocommerce_content(); ?>
    
            </div>                    
    
            <?php layout::side( 'right' , $post_id , 'single');  /*right sidebar*/ ?>
        </div>
    </section>
    <?php get_footer(); ?>

    Here's what gets generated (simplified):

    <div id="primary" class="nine columns">
    	<h1 class="page-title"> Shop </h1>
    	<div class="page-description"></div>
    	<ul class="products">
    	<div class="clear"></div>
    	<form class="woocommerce_ordering" method="POST">
    		<select class="orderby" name="sort">
    	</form>
    </div>

    http://wordpress.org/extend/plugins/woocommerce/

  2. King Rosales
    Member
    Posted 2 years ago #

    Hey gstricklind,

    In your theme's function.php file, add this line to the bottom:

    add_action ('woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 20);

    This will add the sort drop down option above your product listings.

  3. gstricklind
    Member
    Posted 2 years ago #

    Thanks, but that duplicates it. There is now one on top above products listings, and one below.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.