Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
WordPress 3.7 Complete: Third Edition

You're reading from   WordPress 3.7 Complete: Third Edition Nothing has simplified website production quite as effectively as WordPress, and this book makes it easier still to build a fully featured site of your own. Packed with screenshots and clear instructions, it covers everything you need for success.

Arrow left icon
Product type Paperback
Published in Nov 2013
Publisher Packt
ISBN-13 9781782162407
Length 404 pages
Edition 4th Edition
Concepts
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Preface 1. Introducing WordPress 2. Getting Started FREE CHAPTER 3. Creating Blog Content 4. Pages, Menus, Media Library, and More 5. Plugins and Widgets 6. Choosing and Installing Themes 7. Developing Your Own Theme 8. Feeds, Podcasting, and Offline Blogging 9. Developing Plugins and Widgets 10. Community Blogging 11. Creating a Non-blog Website Part One – The Basics 12. Creating a Non-blog Website Part Two – Community Websites and Custom Content Elements Index

Shortcodes

Shortcodes are a handy way to let a nontechnical person, that is, the editor of the website, include dynamic functionality within pages and posts, without having to actually use any PHP, complex HTML structures, or custom JavaScript. In other words, shortcodes are handy reusable pieces of code, yet they don't require any actual coding experience or knowledge on the end user's part.

Shortcodes and the way they work

The way a shortcode works is that you tell WordPress to look at text within square brackets ([]) and evaluate it by running a PHP function. That PHP function can live in your functions.php file of your theme, or in a plugin file, or in a widget file. Let's create a simple shortcode and include it in with our most recent widget, the one we were developing just a minute ago for showing a custom tag cloud.

Types of shortcodes

Shortcodes are a pretty simple concept by definition, but we can still distinguish three main types:

  • Single-tag shortcodes: These shortcodes...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image