Woocommerce Recently Viewed Wordpress Products

I want to include the "Recently Viewed Produdcts" widget in my site. I found out that I can do this with the short code mentioned here: http://www.wpexplorer.com/woocommerce-recently-viewed-products-shortcode/

After implementing this code and creating the plugin, the products appear on the home page very strange, very large and without any style. Then I found out that there is already a widget in the widget section provided by woocomerce.

I am very pleased with the design, but I have some questions that I want to fix:

  • How to add a widget that will be displayed on all pages immediately before the footer?
  • How to make a widget horizontal rather than vertical?

Thank you for helping me!

+5
source share
2 answers

You will need to insert the following into your footer.php file before launching other fields:

<div> <?php echo do_shortcode("[woocommerce_recently_viewed_products per_page='5']"); ?> </div> 

Then we need to see how the style looks as soon as it is in place.

+3
source

First, install the "Shortcode" Recently Viewed Products "plugin

then

 <div><?php echo do_shortcode("[woocommerce_recently_viewed_products per_page='5']"); ?></div> 

'5' instead of '5'

+1
source

Source: https://habr.com/ru/post/1201028/


All Articles