CNC protection in WordPress
One of the main parameters of successful website promotion is static links.. If the links are constantly changing, then the search engines either take them into account poorly, or not taken into account at all.. This mistake is often made when importing goods into an online store..
To understand the situation. When programmers transfer the price to the database, then often they get links like /tovarid1234, where 1234 this is the product number in the database, its unique id. If the products that were already not updated, but they are simply overwritten and new ones are recorded under a new id, then for the same product we get 2 different pages, and this is detrimental to promotion because links should always be static.
I had a couple of times, when the client, who has a website, ordered the promotion of the page to the TOP for the keywords he needed, and after a while he just changed the link. The old link seemed to him not beautiful :-D . As a result of rash actions, site traffic has fallen, since a rather long time has already passed and the link was restored only after a while but the traffic was lost.
To prevent this from happening, I will tell, how to protect from inexperienced site owners the CNC of the site you created in the WordPress CMS.
This is what CNC looks like in WordPress initially:
As you can see from the screenshot, a user with administrator rights can easily change the link and ruin the promotion.. To prevent stupidity from ignorance on the part of the client, simply add the code to the file functions.php your topic.
1 2 3 4 5 6 |
function hide_all_slugs() { global $post; $hide_slugs = "<style type=\"text/css\"> #slugdiv, #edit-slug-box { display: none; }</style>"; print($hide_slugs); } add_action( 'admin_head', 'hide_all_slugs' ); |
That's it, sometimes this code helps when creating sites. I would call the code fool proof, but he really works.
If you want to read more about CNC in WordPress follow the link “CNC Transliteration WordPress“.
/*
- Basic web design course;
- Site layout;
- General course on CMS WordPress and continuation of the course on template development;
- Website development in PHP.