WordPress Words: Slug

A slug is a few words that describe a post or a page. Slugs are URL friendly version of the post title (which has been automatically generated by WordPress), but a slug can be anything you like. Slugs are meant to be used with permalinks as they help describe what the content at the URL is.

WordPress Codex – Glossary Definition of Slug

A permalink is a URL at which a resource or article will be permanently stored. Many pages driven by Content Management systems contain excerpts of content which is frequently rotated, making linking to bits of information within them a game of chance. Permalinks allow users to bookmark full articles at a URL they know will never change, and will always present the same content.

WordPress Codex – Glossary Definition of Permalink

About The Word

In WordPress the slug is the specific address of a post or Page after the domain name. By default, it is a number, the post or Page ID number. Through the use of pretty permalinks, WordPress generates a semantic structure for the slug, which by default is the year, month, date, and post title in readable numbers and words. This may be modified on self-hosted WordPress sites.

Example post permalink: http://wordpress.org/development/2006/06/wordpress-tips-editing-posts/

The slug for that post is “wordpress-tips-editing-posts“.

In general, most people have no need to modify the slug of a WordPress post or Page. WordPress generates it automatically when creating a post or Page, cleaning it up to remove extraneous code and adding hyphens between the words. The main reasons people edit the slug is to shorten the length of the URL if the title is long, and to put more emphasis on SEO keywords.

For More Information

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