Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jaydp

    (@jaydp)

    In preview it looks ok but after hitting import it is importing wrong result.

    Thread Starter jaydp

    (@jaydp)

    I already selected decimal as a separator.

    2023-01-05_09-16-26

    see below image for preview

    2023-01-05_09-17-34

    Please check below url:
    [Link moderated]

    or you can follow below code

    Please first install “WP-Pagenavi” plugin to your store.

    and then write below code to your home page template.

    <?php
    
    global $paged;
    if( get_query_var( 'paged' ) )
    $my_page = get_query_var( 'paged' );
    else {
    if( get_query_var( 'page' ) )
    $my_page = get_query_var( 'page' );
    else
    $my_page = 1;
    set_query_var( 'paged', $my_page );
    $paged = $my_page;
    }
    $args = array( 'post_type' => 'product', 'paged' => $my_page, 'posts_per_page' => 8 );
    $loop = new WP_Query( $args );
    
    echo '
    <ul>';
    while ( $loop->have_posts() ) : $loop->the_post();
    
    	echo '<li class="product">';
    			echo '<a>ID ) ).'" title="'.esc_attr($post->post_title ? $post->post_title : $post->ID).'">';
    			if ( has_post_thumbnail($post->ID) ) {
    				echo get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ) );
    			} else {
    				echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<img src="%s" alt="Placeholder" />', woocommerce_placeholder_img_src() ), $post->ID );
    			}
    			echo '</a>';
    			if(get_post_meta( $post->ID, '_regular_price', true) != ''){
    				echo '<span class="price"><span class="amount">$'.number_format(get_post_meta( $post->ID, '_regular_price', true), 2, '.', '').'</span></span>';
    			} else {
    				echo '<span class="price"><span class="amount">?</span></span>';
    			}
    			echo '<p>'.substr(strip_tags($post->post_content),0,25).'...</p>';
    			echo '<div class="info"><a href="'.get_permalink().'">INFO</a></div>';
    
    	echo '';
    endwhile;
    wp_pagenavi(array( 'query' => $loop ));
    wp_reset_query();
    ?></ul>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code has now been permanently damaged by the forum’s parser.]

    Hi,

    I am getting same problem.
    After activation of this plugin when i upload new products than i am getting page not found error

    Please suggest me ASAP…….

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