Tag Info

Hot answers tagged

3

A lot of time since this quesiton and answer were posted. Since then things has changed a lot. The typical recommendation about disallow crawlers to access wp-content/themes, wp-content/plugins, wp-includes, etc are no longer valid. For example, lets talk about Google. Googlebot was rendering websites without CSS and without js, but not actually. Actually ...


1

You could do it for example like this: function wpse182116_get_categories_starting_with($word) { $categories = get_categories(); if (!empty($categories)) { $relevant_ids = array(); foreach($categories as $c) { $cat_name = $c->name; if(substr($cat_name, 0, strlen($word)) == $word) { $relevant_ids[] = ...


1

Don't run a custom query to get the post count. This is already done by the main query. What you are doing is the same as eating the same piece of meat twice. :-) As said, the main query already return the amount of posts found via the $found_posts property. You can access and display it anywhere on a page as follows echo $wp_query->found_posts; This ...


1

You should follow Joost de Valk's current approach where very little is blocked in robots.txt, but also understand that each site will have a uniquely appropriate policy that will need to be reviewed and changed over time. Many of the answers given here previously are dated and will result in SEO self-sabotage since Google checks for "mobile friendliness" ...



Only top voted, non community-wiki answers of a minimum length are eligible