• Resolved Younes

    (@vanbom)


    I created a Custom Post type like that :

    $pizza_options = array(
        'labels' => $pizza_labels,
        'description' => 'Holds our pizzas and pizza specific data',
        'public' => true,
    //    'menu_position' => 1,
        'menu_icon' => dirname(plugin_dir_url(__FILE__)).'/assets/images/pizza_16.png',
        'supports' => array('title', 'excerpt', 'thumbnail'),
        'has_archive' => true,
        'rewrite' => array(
            'slug' => 'pizzas-a-vaureal'
        )
    );

    but , I found that google index this type of page that I do not want :
    the tree links has the same code Post type mentioned above.
    i don’t want people access these pages.

    thank you

    • This topic was modified 7 years, 5 months ago by Jan Dembowski. Reason: Removed unneccessary links and URLs

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You can block Googlebot from crawling any /pizzas-a-vaureal/ links. To Googlebot in robots.txt this just looks like another sub-folder to not crawl. Blocking Googlebot will not stop anyone from accessing the custom posts, but it will prevent many people from finding it.

    You could also or instead add a do not crawl meta tag in the head section of any requests involving the post type. Add the requisite conditional code to the header template of your theme (preferably child theme)

    Thread Starter Younes

    (@vanbom)

    ok thank you @bcworkz i will try all your recommandations

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘forbid google to reference a Post Type URL.’ is closed to new replies.