PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Woof with Custom loop/query

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

hello,

i created a template with custom loop, in order to displays the last 60days products.. query work perfect and displays the correct products.

Sidebar also shows the filters by color or size...

but when i choose an option, results not filtering.. keep showing the same results..

i use woof with woocommerce shortcode for sales products and works fine.. i mean that with custom loop/query filters not work..

can u help me?

the page is this : https://metaphores.gr/tirkouaz/new-in/

my query is this :

 

$start_date = array(
'year' => date("Y", strtotime("first day of previous month")),
'month' => date("n", strtotime("first day of previous month")),
'day' => date("j", strtotime("first day of previous month"))
);

$end_date = array(
'year' => date("Y", strtotime("+6 week")),
'month' => date("n", strtotime("+6 week")),
'day' => date("j", strtotime("+6 week"))
);

$args = array(
'post_type' => 'product',
'date_query' => array(
array(
'after' => $start_date,
'before' => $end_date,
'inclusive' => true,
),
),
'posts_per_page' => -1,

);

$query = new WP_Query( $args ); ?>

if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
$product = wc_get_product( get_the_ID() );
/**
* Hook: woocommerce_shop_loop.
*/
do_action( 'woocommerce_shop_loop' );
wc_get_template_part( 'content', 'product' );
}
}

else {
echo 'no prods';
}

do_action( 'woocommerce_sidebar' );

wp_reset_query();

 

can you please help ..!

 

thank you...

 

 

Hello

Please paste your license key here - https://share.pluginus.net/image/i20210618130558.png -> https://share.pluginus.net/image/i20210618130614.png

ok i paste it

Please  renew  your  support

To  get  meta and  tax query

global $WOOF;

$tax_query = $WOOF->get_tax_query('');

$meta_query = $WOOF->get_meta_query();