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

Pretty post slug

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 slug. One of the most accurate definitions of what a post slug comes from the WordPress Codex itself. The one 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/wpc5/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 in the area just below the post's title:

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

主站蜘蛛池模板: 通海县| 怀来县| 吉木萨尔县| 屯门区| 油尖旺区| 贞丰县| 渝北区| 饶平县| 苍南县| 乌兰察布市| 房山区| 安顺市| 新余市| 时尚| 岱山县| 独山县| 思茅市| 双城市| 噶尔县| 溧水县| 乐昌市| 长顺县| 吴忠市| 象山县| 清苑县| 景谷| 台安县| 湖州市| 西华县| 诏安县| 永平县| 南开区| 山东| 正定县| 特克斯县| 镇原县| 定安县| 南川市| 安远县| 伽师县| 苍溪县|