• Resolved levsky

    (@levsky)


    I want to keep older posts/pages out of WP search results – but I also want them not to appear in Google search, does that work? I understand the WP search would recognize ‘archived’ status but maybe not Google?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author shawfactor

    (@shawfactor)

    ATM they appear in google unless you configure them not to show up in the front end. The plugin does not exclude them as many people would want their archived content on the front end to be indexed by search engines.

    However it’s trivial to write some code to request google to exclude them

    something like this would work

    add_action(‘wp_head’, ‘my_exclusion_function’);

    function my_exclusion_function(){

    if (is_singular() && (get_post_status() == ‘archive’){

    echo ‘<meta name=”robots” content=”noindex”>’;

    }

    }

    note I’ve not tested the above

    Plugin Author shawfactor

    (@shawfactor)

    I am resolving this for good order as I believe my suggestion should suffice, but will still monitor the thread and reopen if appropriate.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Do archived posts/pages show up in Google search?’ is closed to new replies.