webdevask.com

Menu

  • Home
  • New
  • Add question

wordpress - How to use a WooCommerce shortcode as PHP code

View Original

one text

Solution:

Inside any PHP code, use dedicated WordPress function as follow:

echo do_shortcode("[products columns='3' attribute='ir' terms='20' orderby='date']");

or inserting that on the html code from a php file:

<?php echo do_shortcode("[products columns='3' attribute='ir' terms='20' orderby='date']"); ?>

It will work on your php code.

Source

See also:

  • php สร้าง Google ชีตจากบัญชีบริการ

  • php - Laravel 8.0 Installation Failed

  • javascript - How to include HTML data (tags) as value in "arrayToDataTable" of Google Pie Chart?

  • how to Grouping array in php

  • php - vender folder from my laravel project has more 1k error

© 2021
E-mail: contact@webdevask.com
Back to top