On www.webhostingbreak.com I have custom post types for web hosting companies.
Their url is /hosting-directory/ and unfortunately, since then (aug2010), we’ve still got all those pages at PR0 and rankings overall have been terrible.
The only guess I have is that because visiting /hosting-directory/ causes a 404 error, Google might not see pagerank flowing from the root domain to a subpage of hosting-directory.
We want to remove /hosting-directory/ altogether. We tried doing that but we couldn’t get normal posts in a category to work.
Is there any workaround for this? Custom post types destroyed our rankings and pagerank since august 2010.
Be well and talk soon.
If you want to remove the slug you need to do one of two (2) things:
Stop using custom post types because you don’t seem to understand what they are or are meant to be used for. Use pages instead. They already do EXACTLY what you want to do, permalinks-wise.
Add a custom rewrite rule for each and every individual ‘hosting company’ added in the admin like this:
You should add this to your theme’s functions.php file or in a plugin; I’d suggest a mu-plugin, personally. You could even automate this programmatically, but that would end up costing an extra database query per page load. Just make sure you don’t run those before the
'setup_theme'
hook (the rewrite API isn’t initialized before that hook). Hooking on'init'
would be plenty safe.Then you would have to flush the rewrite rules by going to
/wp-admin/options-permalinks.php
(just visiting the page is enough.)Another way to achieve this is by making your plugin with hooks like:
Instead of brandbook put your custom post type name/slug.
You can modify regex to your needs as well.
With this code page opens without redirect to custom post type with both of these links: