Categories
Woocommerce

How to display product price using shortcode

Here is the code snippet that you can use to create a shortcode and use it in any of your posts or pages to display the price of a specific product. You just have to specify the woocommerce product ID of that product like the given example. [woo_product_price id=20]

Categories
Filter Shortcode

How to execute shortcode in any string or custom field in WordPress

You can use WordPress filter the_content and apply it to any string or custom field data to display its HTML content as well as render or execute any shortcode in it. Here is a code snippet, where a string with some HTML content and a shortcode in it. The above code will not just display

Categories
Functions

How to create a short code to display recent posts

You may want to display most recent posts of your website in your WordPress website post or page. You can achieve that creating a custom WordPress shortcode. Let me first explain what is a WordPress shortcode and how it works. What is a WordPress shortcode? WordPress Shortcode is a feature defined in WordPress core that