New Landing How can we help? Atelier Change Date Range for Latest Products

Viewing 3 posts - 1 through 3 (of 3 total)
  • Posted in: Atelier
  • #257252
    dvdowns
    Member
    Post count: 19

    I’m not sure how to change the range of time that includes products in the “Latest Products” feature. I’m starting to think that all products are included, but simply listed in descending order.

    Is it possible to change this through the theme settings, or is it a code level change? If so, could you point me in the right direction of the file, please 🙂 Thanks.

    #257277
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Yes, using ‘Latest Products’ will display products in order of newest first. You need to set the number of products you want to show, otherwise it will show all of them

    – Kyle

    #257308
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You can edit the sf-product.php file at /atelier/swift-framework/content/.
    Find this code to edit:-
    if ( $asset_type == “latest-products” ) {
    $args = array(
    ‘post_type’ => ‘product’,
    ‘post_status’ => ‘publish’,
    ‘product_cat’ => $category,
    ‘ignore_sticky_posts’ => 1,
    ‘posts_per_page’ => $item_count
    );
    And refer also this https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters before making any changes.
    Thanks
    Mohammad

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register