How To Create Shortcode in WordPress

Recommended by 158 people
. in Tutorial, web . 58 sec read
Recommended by 158 people using medio theme that support shortcode for full width image, like this




To show this full-width image is like this:


This is just an example, you can use shortcode for anything what you need in your theme.


How to make shortcode in wordpress theme

To make shortcode, edit functions.php in your theme than add this:


From this code, every image inside “fullw” we will give <div class=fullw> before the image url and give </div> after the image url. You can try another for your need. Have a question? Leave a comment.

Other stories written by muchad
Recommended stories
Write a response...
Your email address will not be published. Required fields are marked *