-
Search Results
-
Topic: Multiple Search Forms – Woo
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.phpI’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 18If 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; ?>Topic: Pagination Issue
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.Topic: AJAX pagination
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 aWhen 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