Search Results for 'archive-product'

Forums › Forums › Search › Search Results for 'archive-product'

Viewing 10 results – 21 through 30 (of 68 total)
  • Author
    Search Results
  • #168787

    Anonymous
    Inactive

    Have a site with multiple product categories – Accessories, Jewellery, Footwear & Watches.
    We need to have the search form show sub-category, taxonomy & attribute choices.
    I thought I could do this by setting up a different form for each of the four parent categories.
    But got the following: ‘Error: There are 2 Search Forms using display mode WooCommerce Shop – you may only have 1’
    If we can’t set up a separate form for each category, with selected taxonomies in each.
    Then, how can I set the form up to only show choices that are available within the category that is showing on archive-product.php

    #154903

    Anonymous
    Inactive

    I tried to add the code to the existing query args, and it just returned. There was no UI for filtering the posts by year.

    Yes, I have two page templates that display the CPT Productions. The main CPT archive, file called archive-productions.php only displays future productions.

    I have another page template called page-past-productions.php that has a custom query that displays only past productions. This is the page where I want to display the filter UI.


    Anonymous
    Inactive

    I’m having a difficult time getting the plugin to work with a custom post type on a page where I have a custom query built.

    I have a CPT called Productions. The upcoming productions and the past productions are displayed in different areas of the site. The archive-productions.php template only displays upcoming productions.

    I have a page template that displays only the past productions, called page-past-productions.php, using a custom query.

    I’m trying to implement a filter UI in the past-productions page template so users can drill down by year.

    I installed the plugin and created the form, using the post meta of “event date,” which corresponds to the ACF date picker field I’m using for Productions CPT.

    I tried to implement the form using the shortcode, and I got a syntax error.

    Parse error: syntax error, unexpected '6128' (T_LNUMBER) in /Users/labedzde/Documents/Sites/acmusic/wp-content/themes/acm/page-past-productions.php on line 18

    If it helps, here’s the whole code of my custom query, which sits in a page template called page-past-productions.php):

    
    	<?php echo do_shortcode("[searchandfilter id="6128"]"); ?>
    
    <?php 
    						//Set server timezone to central
    						date_default_timezone_set('America/Chicago'); 
    						//Today's date
    						$today = date('Y-m-d H:i:s'); 
    						?>
    
    						<?php //arg to determine if the post is a past event.
    						$args = array(
    						'post_type'		=> 'productions',
    						'posts_per_page'	=> 10,
    						'order' => 'DESC',
    						'meta_query' => array(
            array(
                'key' => 'event_date',
                'value' => $today,
                'compare' => '<=',
            ),
            )
    
    							); 
    						?>
    
    						<?php 
    						// the past events query
    						$query = new WP_Query( $args ); 
    						?>
    
    <?php if ( $query->have_posts() ) : ?>					
      <!-- the loop -->
      <?php while ( $query->have_posts() ) : $query->the_post(); ?>
    
      
    
    							<article id="post-<?php the_ID(); ?>" <?php post_class( 'cf' ); ?> role="article">
    
    								<header class="article-header">
    
    									<h3 class="h2"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    									
    
    								</header>
    
    								<section class="entry-content cf">
    
    									<?php if ( has_post_thumbnail() ) : ?>
        <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
            <?php the_post_thumbnail('bones-thumb-300'); ?>
        </a>
    <?php endif; ?>
    
    								</section>
    
    								<footer class="article-footer">
    
    								</footer>
    
    							</article>
    
    							<?php endwhile; ?>
    
    						
    						
    
    									<?php wp_reset_postdata(); ?>
    
    							<?php else : ?>
    
    									<article id="post-not-found" class="hentry cf">
    										<header class="article-header">
    											<h1><?php _e( 'Oops, Post Not Found!', 'bonestheme' ); ?></h1>
    										</header>
    										<section class="entry-content">
    											<p><?php _e( 'Uh Oh. Something is missing. Try double checking things.', 'bonestheme' ); ?></p>
    										</section>
    										<footer class="article-footer">
    												<p><?php _e( 'This is the error message in the custom posty type archive template.', 'bonestheme' ); ?></p>
    										</footer>
    									</article>
    
    									<?php bones_page_navi(); ?>
    
    							<?php endif; ?>
    
    #116447

    Anonymous
    Inactive

    Yes, the template is the standard Woocommerce archive-product.php template file which already includes the do_action( ‘woocommerce_before_shop_loop’ ); code.
    Should it be in the woocommerce/archive-product.php path or directly as archive-product.php in the same folder as the style.css
    I tried both but the hook- @hooked woocommerce_catalog_ordering – 30 doesn’t work in either place.

    #116364

    Trevor
    Participant

    If I understand this correctly, you are using ‘As an Archive’ and specifying that template. Did you already add that do_action to the template?

    Can I confirm that this is the standard WooCommerce archive-product.php template file?

    #116281

    Anonymous
    Inactive

    I tried setting the ‘display results method’ as woocommerce/archive-product.php and the template is being used but the ` <?php
    /**
    * woocommerce_before_shop_loop hook.
    *
    * @hooked woocommerce_result_count – 20
    * @hooked woocommerce_catalog_ordering – 30
    */
    do_action( ‘woocommerce_before_shop_loop’ );
    ?>
    is not showing the catalog sorting dropdown with the ‘display price high to low, most popular etc’.

    If I choose ‘display results’ as WooCommerce Shop then it does show the catalog_odering. But it only allows me to use this woocommerce shop display once and I have multiple filters.
    How can I set up the template to be used to make sure it also shows the woocommerce_catalog_ordering?
    I’m using the storefront theme.
    Thanks

    #72399

    Anonymous
    Inactive

    I’m having a few issues with our filtering. We are using PRO and the updated 2.2 version.
    First issue is when a filter is selected with less than 20 items, say 5, you still get a full results in the pagination. We downloaded and installed WP-PageNavi to override the woocommerce pagination and not having any success. I have the selector set to “.wp-pagenavi a” and are using an archive template, custom template of woocommerce/archive-products.php as we are needing many filter forms.

    #69500

    Anonymous
    Inactive

    Hello,

    is there a way how to make pagination with ajax (not requring page reload).

    I have set up a following filter:

    Post types – products & variants
    Auto submit form – checked
    Enable auto count – checked
    Display results method – as an archive
    Template – woocommerce/archive-product.php
    Load results using Ajax – checked
    Make searches bookmarkable – unchecked
    Only use Ajax on the result page – unchecked
    Result contiainer – css identifier of result container
    Pagination selector – .woocommerce-pagination a

    When I select option in filter, everyhing works nicely – products gets redrawn using filtered products and paginations links are updated, however when I click on pagination link I get redirected to filter page (this does not happen when I select filter option not even first time). Is there a way how to achieve the same functionality with pagination?

    Thanks

    #53584

    Anonymous
    Inactive

    I think I have to change archive-product.php, but how do I do that?

    #46999

    Anonymous
    Inactive

    Hello again!
    I have now updated the page so that the search shortcode is added to the archive-product.php and it seems to work better now.

    However, if I chose something from all three taxonomies I still get a result, even though I picked the first two taxonomies that contain zero results.

    Will add instructions and URL in a private reply below.

    Regards

Viewing 10 results – 21 through 30 (of 68 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.