Search icon CANCEL
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 Development Quick Start Guide

You're reading from   WordPress Development Quick Start Guide Build beautiful and dynamic websites for your domain from scratch

Arrow left icon
Product type Paperback
Published in Oct 2018
Publisher Packt
ISBN-13 9781789342871
Length 300 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Rakhitha Nimesh Ratnayake Rakhitha Nimesh Ratnayake
Author Profile Icon Rakhitha Nimesh Ratnayake
Rakhitha Nimesh Ratnayake
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Introduction to WordPress Development FREE CHAPTER 2. Managing Database Structure, Storage, and Retrieval 3. Designing Flexible Frontends with Theme Development 4. Building Custom Modules with Plugin Development 5. Extending Plugins with Addons, Filters, and Actions 6. Practical Usage of WordPress APIs 7. Managing Custom Post Types and Processing Forms 8. Discovering Key Modules in Development 9. Enhancing Security, Performance, and Maintenance 10. Other Books You May Enjoy

Building custom shortcodes


The process of building custom shortcodes is not as complex as many people think. The minimal implementation of a shortcode requires only few lines of code as shown in the diagram in the last section. A shortcode consists of four main parts:

  • Opening and closing tags: Opening and closing tags are similar to HTML, WordPress shortcodes have opening and closing tags using square brackets. These tags are used by content creators to add the functionality into posts or pages. On the other hand, developers need to use this tag to register a shortcode as a unique element. Some of the shortcodes don’t have a closing tag and use a self-enclosing opening tag. 
  • Attributes: Attributes is a collection of data and settings required to process the functionality within the shortcode function and return the output. The list of attributes starts after the shortcode name in the opening tag. Each attribute has a key and values, as shown in the structure of a shortcode image. The attributes...
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 €18.99/month. Cancel anytime