Posts Tagged ‘ WordPress Shortcodes ’

Creating a Simple Shortcode

Friday, February 12th, 2010

WordPress shortcodes are actually very easy to create. If you know how to write a basic PHP function, then you already know how to create a WordPress shortcode. For our first shortcode, let’s create the well-known “Hello, World” message.

  1. Open the functions.php file in your theme. If it doesn’t exist, create one.
  2. First, we have to create a function to return the “Hello World” string. Paste this in your functions.php file:
    function hello() {
    return 'Hello, World!';
    }
  3. Now that we have a function, we have to turn it into

read more...

WordPress “Send to Twitter” Button Without Using a Plugin | posted on: Friday, February 12th, 2010