All posts by Noel Binns

Hello everyone. My name is Noel Binns, I am a west coast transplant and the only regret, not doing it sooner. I really love the weather, the fresh seafood and have a love affair with a good bowl of pho. I have built boats for Wellcraft, done a lot of electrical work and spent 15+ years in the automotive industry. If it rolled on wheels I worked on it.

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

WordPress Words: Slug

The post slug is the user friendly and URL valid name of a post. Most common usage of this feature is to create a permalink for each post. WordPress automatically generates post slugs from a post’s title.
WPBeginner Glossary – Post Slug

Example post permalink: http://wordpress.org/development/2006/06/wordpress-203/

The slug for that post is wordpress-203.

Slugs are also used for post types, categories, tags, etc. Like post and page slugs, this is usually for creating URL friendly versions of these items.

The post slug, category slug, tag slug, Page slug, etc., are set by the Permalink structure in WordPress, customizable on self-hosted versions of WordPress through Settings > Permalinks

About The Word

Named for the lead used in typesetting. The lead was lowered into a heated container that melted the metal for pouring into forms like the Linotype typeset masters to form letters, words, or sentences as the technology improved. It also became the term for the space between paragraphs. The point system of measurement still used today in print and web design came from those days where typesetting was set in strips of 6-point led, and one line of Linotype equaled one piece of lead. Connecting the past with the present, the post slug is the line, label, or name of the web page when WordPress or a CMS is setup to display it in word form rather than numbers or conditionals.

In WordPress, the slug is a cleaned up set of the words used in the post, Page, category, or other pageview title. WordPress automatically cleans up punctuation and sets the words to lowercase so that Sally’s Pretty Dresses!” will become sallys-pretty-dresses.

To edit the slug of a post or Page, on the Edit Screen of that post or Page, click the Edit Slug or Edit next to the post title URL.

Some users edit long titles to shorten the permalink slug such as a post title “This is the Story, a Long Story, of How I Learned that WordPress was the Only Content Management System for Me” could be easily shortened to “WordPress is Only CMS for Me.” Others will edit the slug to a more SEO-friendly phrase the uses only the most important and relevant keywords, such as “WordPress CMS” for the above title.

Once published, the post slug should not be changed as it will results in a Page Not Found Error.

The slug for categories, tags, authors, and other generated pageviews in WordPress are set in the WordPress Theme through the use of template tags that automatically generate the pageview title, often based upon their names set through Posts > Categories or by the Author Username or Display Name settings.

For More Information