What are Shortcodes?


Web Development Tips WP

Shortcodes, which many plugins take advantage of, are an easy and quick way to insert special kinds of content into your posts or pages.

A shortcode typically looks something like this one from a plugin that is supposed to display the number of categories on a site:

[catcount]

You just pop your shortcode into your post, and then behind the scenes everything gets called into the post in the way it should.

So in the case above, I might write a post that says the following:

The total number of categories is [catcount].

If I have 21 categories, then when the post is published it will read:

The total number of categories is 21.

If I add a category, then that number will automatically get bumped up to 22.

View original post 156 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s