• Hey yall –

    Don’t mind the mess – I am trying to fix an artist WordPress site and the front page store is acting funny- can’t get the order to change to what we want. Have tried setting it in Customize which worked before, and works in the Shop page, but the order seems stuck on the homepage and so am I. Is there a way to custom set the order, or is something wrong?

    Here’s the code:

    
    
    						<?php
    
    						$args = array( 'post_type' => 'product');
    						$loop = new WP_Query( $args );
    
    						while ( $loop->have_posts() ) : $loop->the_post(); ?>
    						<?php $price = get_post_meta( get_the_ID(), '_price', true ); ?>
    						<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $loop->post->ID ), 'single-post-thumbnail' );?>
    
    								<div class="content__item product" style="--aspect-ratio: 5/5;">
    										<div class="content__item-imgwrap">
    											<a href="<?php echo get_permalink( $loop->post->ID ) ?>"><h5><?php the_title(); ?><br><span><?php echo wc_price( $price ); ?></span></h5></a>
    											<div class="content__item-img" style="background-image: url('<?php  echo $image[0]; ?>');"></div></div>
    										<a href="product.html"><h5 class="content__item-title "></h5>
    									</a>
    								</div>
    
    						<?php endwhile; wp_reset_query();?>

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • the same question….. anyone help ?

    Thread Starter hirezolution

    (@hirezolution)

    Bump… there has to be an answer to this!

    I have even restored the site from a full backup and same problem, even though it was in the correct order.

    No way to just reverse the query to get the results in the opposite order?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Woocommerce shop question’ is closed to new replies.