Shortcodes!

Hello World

Wow. Just learned an awesome WordPress feature, Shortcodes! Shortcodes are super simple to create and I just know I’m going to have many many opportunities to use these in the future. As a test the “Hello World” you see above was created with a simple shortcode and I’ll show you how simple it is to create a short code.

Shortcodes are created in the functions.php file in your theme directory. Open functions.php up and pick a place to put your code. The first thing you are going to do is create a simple function. Try this one.

function Hello() {
return “Hello World”;
}

Then below this you will create the shortcode by typing this…

add_shortcode( ‘hw’, ‘Hello’);

As you can see the first parameter will be the name of your shortcode (hw). The next parameter is the function that your shortcode will execute (Hello).

Now you are free to use this shortcode in any of your pages or posts. Just place Hello World anywhere in your posts or pages in the wordpress editor. When you go to view the post or the page you will see “Hello World”.

Magento

So I’ve recently began learning the Magento e-commerce platform. Magento is one of the most popular, open-source, e-commerce platforms in use today. It uses a combination of HTML, PHTML, XML, and PHP files as the core files of the platform. It is possible to customize magento and build templates to make your e-commerce site look unique and stand out among the crowd. There is definitely a learning curve involved and an intricate file structure you must learn to navigate. This is to be expected for a system that is so customizable. It just takes a lot of code to provide all the functionality and customization abilities. I’m excited about learning more and adding this new tool to my web developer toolchest.