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

    (@shawfactor)

    Are you talking about the meta noindex tag?

    If so no but it would be trivial to add this meta tag by custom code, really just a few lines (I’m happy to write them for you), although I’m not sure I’d add it to the plugin itself.

    Thread Starter dalecameronlowry

    (@dalecameronlowry)

    Yes.

    That would be great. Currently I am periodically add archived posts to Archive category and then they get noindexed via this function:

    if (is_single() && in_category(‘archive’)) {
    echo ‘<meta name=”robots” content=”noindex, follow”>’;
    }

    But if I could do it without the category it would be easier.

    Plugin Author shawfactor

    (@shawfactor)

    I have tested this and it works for me:

    function custom_add_html_meta() {

    global $post;

    if (is_single() and ($post->post_status == ‘archive’)) {
    echo ‘<meta name=”robots” content=”noindex, follow”>’;
    }

    }

    add_action(‘wp_head’, ‘custom_add_html_meta’);

    Plugin Author shawfactor

    (@shawfactor)

    Dale,

    I’m resolving this for good order as I’m pretty sure this will work for what you need but I will still monitor the thread.

    Pete

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Noindex?’ is closed to new replies.