SHARE

What is shortcode

ShortCode is term used in wordpress . Short Code is built in feature in wordpress . Short codes are introduced in wordpress 2.5 version . These are used to creating macros for used in posts or pages .

In wordpress user can’t and any function or any php code in between the post or the page .

Example

For example you want to add two text boxes and a submit button in specific post or page . You want that  ,when user click on submit button ,then both text boxes values are added . Add sum of these values are display in message box .

To user this submit button you need to “onclick()” . But problem is that by default you can’t use onclick() between specific post or page . Short code solve this problem . User add this onclick function in post using a short code .

How shortcode works

By default WordPress trim the php codes and functions from pages or posts . When user try to add php code in post or page , code is filtered from it or commented out .

With shortcode , user add php code in function.php file or plugin and paste this shortcode keyword in the page where user want to insert this php code .

For more details about shortcodes see this link.

Syntax

Short code syntax is [ ShortcodeName ] . It starts with angle bracket ” [ “then short code “name” and  “] “angle bracket close .

SHARE
Previous articlePHP Definition And Diffrence Between HTML And PHP
Next articleWhat Is OS or Operating System Definition
Manu Mahajan Born 26 Dec 1980 ,Is a founder of Tectrick and MM Toy World. www.tectrick.org is a free digital helping guide on many usable topics to the readers in various method such as Youtube videos , Articles and social media conversation MM Toy World is manufacturer , wholesaler and online retailer of soft toys, personalized gifts ,toys corporate gifts .