Forum Replies Created
-
AuthorPosts
-
gavriel_wtTj
Participantgreat. Ernest, i really want to thank you for the top support!!
gavriel_wtTj
Participantbeautiful! that seems to have done the trick
this will work on any filter now . .right?
gavriel_wtTj
ParticipantGood morning
see attached screenshot. I just tried with this custom field setup and this works. But i would have to show the settings and one has to click on it to make it work.So i tried with adding 1737621233 in the hidden value (when using the hidden field setup) and this works.. which makes sense as 0 is the 1970 🙂 and i want to show events with expiration more or equal that TODAY. Do you have any macro that I can add to the value field for today/current datetime?
gavriel_wtTj
Participantdosnt seem like it does anything. I still get the results of old products that have the expiration_date in the past (see screenshot)
gavriel_wtTj
Participantyes i have set it as you mentioned . see attached image
could it have anything to do with the fact that this is a jetengine metafield?
gavriel_wtTj
Participantsorry, didnt see you replied as it was on page 2 😉
i just tried your set but it’s not working 🙁 Could it be because my field is a timestamp and it’s checking against the value 0?
gavriel_wtTj
Participantdo you think this is possible?
gavriel_wtTj
Participanti think we will be creating our own filter for this as there is alot of customization that we need.
I haev another question: on the homepage im using the live search. Is there any option or hook to only include products that have a timestamp metafield in the future?
In my products i have a metafield expiration_date which is saved as timestamp. I would like to only return items that have this date in the future.thanks
gavriel_wtTj
Participantthanks alot.
i just made the changes and now it does filter, but breaks the main query.
Im trying a couple of things with custom code and if i dont manage I would really appreciate your assistance. Thanksgavriel_wtTj
Participanti added it to the UL and it did nothing. If i add it to the li, it triggers something only on the first item
gavriel_wtTj
Participanthi, first of all, thanks alot for the support
i implemented all 3 steps but allas its still not working
https://woocommerce-707975-4987928.cloudwaysapps.com/tickets/music/nothing happens when filtering
gavriel_wtTj
Participantah great 🙂 thanks. looking forward to hearing back from you then!
gavriel_wtTj
Participantany idea? 🙂
gavriel_wtTj
Participantand note that it’s not an archive template, these are pages
gavriel_wtTj
Participantits a custom loop.
we are using jetengine query builder to create the query and then this is our code in the template:if (!empty($product_ids)) {
// Convert the comma-separated product IDs into an array
$product_ids_array = explode(‘, ‘, $product_ids);// Query the products based on the retrieved IDs
$args = array(
‘post_type’ => ‘product’, // Ensure you’re querying WooCommerce products
‘post__in’ => $product_ids_array,
‘orderby’ => ‘post__in’, // Preserve the order from the JetEngine query
‘posts_per_page’ => -1, // Adjust the number of products as needed
);$product_query = new WP_Query($args);
if ($product_query->have_posts()) :
?>
<ul id=”products-grid” class=”products-grid” style=”–width: 45%;”>
<?php while ($product_query->have_posts()) : $product_query->the_post(); ?><!– Include the product-card loop template from the loops folder –>
<?php get_template_part(‘template-parts/product-loop’, ‘loop’); ?><?php endwhile; ?>
<?php wp_reset_postdata();
else :
echo ‘No products found for the selected query.’;
endif; -
AuthorPosts