官术网_书友最值得收藏!

Pretty post permalink

We've already talked about tuning the permalinks settings of your site in Chapter 2, Getting Started with WordPress. Now is a good moment to expand on this knowledge and discuss a little something called the post permalink, or slug.

One of the most accurate definitions of what a post slug is comes from the WordPress Codex itself. The resource provided at https://codex.wordpress.org/Glossary#Post_Slug teaches us that the post slug is made from a few lowercase words separated by dashes, describing a post and usually derived from the post title to create a user-friendly permalink.

In other words, the post slug is what comes after your domain name in the post's URL. For example, my post about my top three favorite dishes uses this URL: http://localhost/my-top-3-favorite-dishes/, where the last part —my-top-3-favorite-dishes, is the slug. Just like the official definition says, WordPress chooses the slug by taking my post title, making it all lowercase, removing all punctuation, and replacing spaces with dashes. If I'd prefer it to be something else, such as 3-favorite-dishes, I can change it by going to the Document tab of the settings sidebar and looking for the section labeled Permalink:

Readable URLs are something that Google Search loves, so using them helps to optimize your site for the search engines. It also helps users to figure out what a post is about before clicking on the URL.

主站蜘蛛池模板: 玉屏| 石屏县| 鸡东县| 大洼县| 广南县| 亳州市| 师宗县| 中超| 平湖市| 八宿县| 稷山县| 云浮市| 皋兰县| 调兵山市| 聊城市| 龙川县| 镇沅| 茶陵县| 曲靖市| 客服| 旺苍县| 江口县| 中卫市| 西畴县| 鄱阳县| 临沭县| 商水县| 芜湖县| 武义县| 和平县| 邢台市| 横山县| 临清市| 景泰县| 洛隆县| 海伦市| 交城县| 渭南市| 长沙县| 黔西县| 扶余县|