Tags » WordPress Shortcode

WordPress Shortcode in Theme File

WordPress shortcodes allow you to easily add content to your site or blog without needing to include complicated coding. Many theme and plugin developers program shortcodes with their products and there might come a time when you might need to include a shortcode in  your theme file. 51 more words

Cool Things You Can Do

How to Check if shortcode exists

WordPress allows you to check weather a shortcode exists or not. To check it you can use shortcode_exists() function. It returns true if the shortcode exists. 30 more words


WordPress Shortcode Examples

Creating a self-closing shortcode

The simplest shortcode is the self-closing one. We’re going to create a simple link to our Twitter account, and then add it in a blog post. 93 more words


Enable Shortcode in Text Widget

Copy and paste the following code in your themes functions.php

<?php add_filter(‘widget_text’, ‘do_shortcode’); ?>

Sanjay Triumph

Google Map Shortcode

This code is for google map shortcode in wordpress. It is 100% working just copy this to your functions.php

function googlemap_function($atts, $content = null) {
      "width" => '640',
      "height" => '480',
      "src" => ''
   ), $atts));

   return '';
add_shortcode("googlemap", "googlemap_function");


Wordpress Hooks

Toggle Box Shortcode

This code is to create toogle box in WordPress. Just Copy this code to your function.php

 function toggle_shortcode( $atts, $content = null ) {
 extract( shortcode_atts(
 'title' => 'Click To Open',
 'color' => ''
 $atts ) );
 return '<h3><a href="#">'. 177 more words
Wordpress Tutorials