How To Create Shortcode in WordPress

Recommended by 314 people
. in Tutorial, web . 58 sec read
Recommended by 314 people

muchad.com using medio theme that support shortcode for full width image, like this
 

wordpress-colours.jpg

 
To show this full-width image is like this:
muchad_shortcode.jpg
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.



Responses
 
Write a response...
Your email address will not be published. Required fields are marked *