No index directives on all or some GD pages
File Method
The file below has 2 hooks:
- add noindex to all GD pages
- add noindex to some GD pages, with a comprehensive list of conditionals
Should work with most SEO plugins.
Snippet
The following snippet will de-index all single listing pages.
It's possible for your developer extend it to include others, like search, archives, etc.
add_filter( 'wp_robots', 'gdsnippet_no_robots', 999, 1 ); function gdsnippet_no_robots( $robot_directives ) { if ( function_exists( 'geodir_is_page' ) && geodir_is_page( 'single' ) ) { return [ 'noindex' => true, 'nofollow' => true, ]; } return $robot_directives; }