It’s very tricky to create Shorts codes for any functions created in wordpress. With shortcode we can use the functionally anywhere in the wordpress theme with easy way. Here it’s a function that will tells you how to create the shortcodes in PHP
Function MyShortcode()
{
return ‘<p>Hello World! I Love ShortCodes</p>’;
}
add_shortcode(‘ShortcodeName’, ‘ MyShortcode ‘);
After adding this code in theme function.php file you can add Short code in wordpress pages.
The function add_shortcode pass two parameters’, first is Name of shrotcode and second parameter is Function that we can to call with the shortcode.
To call short code you can use [ShortcodeName] anywhere in the pages and post to call shortcodes.
You must be logged in to post a comment.
Make an Enquiry
Categories
- Algorithm Update
- Articles Submission
- Canonicalization urls
- Dedicated Web Server
- Digital Marketing
- Frameworks
- Google Adsense
- Google Webmaster
- HTML
- Industrial Training projects for MCA/Engineering
- internet Marketing
- Job Openings
- Joomla Development
- MCA Live Projects
- MLM Software
- Newspaper Theme 8.5
- Notices
- Others
- Pay Per Click Advertising
- Paypal Integration
- PHP Development
- PHP MySQL
- PHP Professional Training
- Related Posts
- Search Engine Optimization
- Social Bookmarking
- Social Media Marketing
- Software Testing
- W3cValidation
- Wordpress

