How to use WordPress Shortcode in template

Shortcodes in WordPress are little bits of code that allow you to do various things with little effort. You can use in the content area to invoke some kind of function to accomplish certain tasks.

But what if you want to use a shortcode from within a template instead of with the content of a Post/Page? You can invoke it with a special function:

<?php echo do_shortcode("[shortcode]"); ?>

Web Setup Wizard 401 Unauthorised Access

Today I got issue on Magento2 site when try to open Web Setup Wizard section.

System -> Tools -> Web Setup Wizard

Here is the solution for fixing this issue. This one works for me so I thought it would be just posted for all of the world 🙂

You have change some settings as per below.

Goto Stores -> Configuration – > General -> Web

Base URLs (Secure)
-> Use Secure URLs on Storefront -> Yes
-> Use Secure URLs in Admin -> Yes
-> Enable HTTP Strict Transport Security (HSTS) -> Yes
-> Upgrade Insecure Requests -> Yes

and then run the below command
php bin/magento cache:clean