Skip to content
Advertisement

Tag: shortcode

Create order details shortcode for WooCommerce

Hey I am trying to build a shortcode for my order details on the order received page. The code below will generate the last result and then on top of it, it will display the word Array. My guess is that something in the foreach loop i am creating is still an array, but I dont know what to do

How to add if and else condition in wordpress shortcode

I have a shortcode showing the username of the current user, it works. What I want to do is insert conditions. if the user has the username show it, otherwise show first name or something else. I searched on google and here on stack, I understood this is possible thanks to the if and else conditions but I’ve never done

Display related products using a shortcode on WooCommerce My account Dashboard

I’m trying to display related products in My account Dashboard page. I followed this WooCommerce Shortcodes documentation. I tried to use the following code: This does not display the related products. But when I try to display products in specific category like following, it works: Kindly any help to resolve this? Answer Note that related products shortcode need to be

Advertisement