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

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.

主站蜘蛛池模板: 泰和县| 白沙| 天气| 西城区| 离岛区| 辰溪县| 平陆县| 平阴县| 墨玉县| 漯河市| 丽江市| 榆林市| 宾川县| 扎囊县| 右玉县| 崇阳县| 琼中| 杭锦旗| 林州市| 龙门县| 美姑县| 皋兰县| 格尔木市| 汪清县| 晋江市| 胶南市| 武汉市| 班玛县| 黔南| 巨鹿县| 鹿泉市| 屏东市| 延川县| 商城县| 阳高县| 同心县| 桃源县| 闽侯县| 海晏县| 桐柏县| 渭源县|