Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jayzhenli

    (@jayzhenli)

    Does the below screenshot mean that Google has already re-indexed my website? If the answer is YES, why are the price and stock still there?

    https://ibb.co/xmp04g9

    • This reply was modified 2 years, 8 months ago by jayzhenli.
    Thread Starter jayzhenli

    (@jayzhenli)

    Hi @oaoyadeyi

    Thank you for your response. Google has reindexed my website with the sitemaps that I submitted, but the price and the stock status are still there, still showing on the bottom of the search result.

    How can I get rid of them, it is really confusing me.

    Thread Starter jayzhenli

    (@jayzhenli)

    @timvaniersel
    Hi Tim, sorry for bothering you, can your plugin “remove schema” solve my issues?

    Thread Starter jayzhenli

    (@jayzhenli)

    Create our own shortcode to display the specific products and our our own template as below, for example, wc_get_template_part( ‘content’, ‘product-test’ );

    add_shortcode( 'sale_products_test', 'sale_products' );
    function sale_products( $atts ){
        global $woocommerce_loop, $woocommerce;
    
        extract( shortcode_atts( array(
            'per_page'      => '12',
            'columns'       => '3',
            'orderby'       => 'title',
            'category'      => 'clearance',
            'order'         => 'asc'
            ), $atts ) );
    
        // Get products on sale
        $product_ids_on_sale = woocommerce_get_product_ids_on_sale();
    
        $meta_query = array();
        $meta_query[] = $woocommerce->query->visibility_meta_query();
        $meta_query[] = $woocommerce->query->stock_status_meta_query();
    
        $args = array(
            'posts_per_page'=> $per_page,
            'orderby'       => $orderby,
            'order'         => $order,
            'no_found_rows' => 1,
            'post_status'   => 'publish',
            'post_type'     => 'product',
            'orderby'       => 'date',
            'order'         => 'ASC',
            'meta_query'    => $meta_query,
            'post__in'      => $product_ids_on_sale,
            'tax_query' => array( array(
                'taxonomy' => 'product_cat',
                'field' => 'slug',
                'terms' => $category,
            )),
        );
    
        ob_start();
    
        $products = new WP_Query( $args );
    
        $woocommerce_loop['columns'] = $columns;
    
        if ( $products->have_posts() ) : ?>
    
            <?php woocommerce_product_loop_start(); ?>
    
                <?php while ( $products->have_posts() ) : $products->the_post(); ?>
    
                    <?php wc_get_template_part( 'content', 'product-test' ); ?>
    
                <?php endwhile; // end of the loop. ?>
    
            <?php woocommerce_product_loop_end(); ?>
    
        <?php endif;
    
        wp_reset_postdata();
    
        return ob_get_clean();
    }
    • This reply was modified 2 years, 9 months ago by jayzhenli.
    • This reply was modified 2 years, 9 months ago by jayzhenli.
    Thread Starter jayzhenli

    (@jayzhenli)

    @a2hostinglk Yes, thanks for your help, but the price of that plan is $69 per month and $199 activation fee. This seems like exceed my budget. Can I get an alternative one?

    Thread Starter jayzhenli

    (@jayzhenli)

    Hi @judagutor,

    Thank you so much, your answer really helps me a lot.

    Thread Starter jayzhenli

    (@jayzhenli)

    @corrinarusso
    Thank you for your help. It makes me much clear about what I wanted, so I edited my question as below.

    Actually, I want to create a custom unique user id when I create a new user front backend.

    Because I want to show the user name and user id on the frontend
    for example:
    User Name: example name
    User ID: abc12x

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