• Resolved rachbeginner

    (@rachbeginner)


    Hi,

    I’ve been able to index single events in google using the following php code before (add_filter( ‘tribe_events_add_no_index_meta’, ‘__return_false’ );) , but I think it has stopped working,

    My robot.txt from rankmath

    For WordPress
    
    User-agent: *
    Disallow: /wp-admin/*
    Disallow: /wp-login.php
    Disallow: /wp-includes/*
    Disallow: /wp-content/*
    Disallow: /trackback
    Disallow: /feed
    Disallow: /comments Disallow: ?replytocom
    Disallow: /comments-page-
    Disallow: */trackback
    Disallow: */feed
    Disallow: */comments Allow: /wp-content/cache/*
    Allow: /wp-content/uploads/*
    Allow: /wp-content/themes/*
    Allow: /wp-content/plugins/*
    Allow: /wp-includes/js/*
    Allow: /wp-includes/css/*
    Allow: /wp-admin/admin-ajax.php For Events Calendar Disallow: post_type=tribe_events
    Disallow: hide_subsequent_recurrences=
    Disallow: tribe-bar-date=
    Disallow: tribe-venue=
    Disallow: eventDisplay=
    Disallow: eventDate=
    Disallow: paged=
    Disallow: pagename=
    Disallow: shortcode=
    Disallow: ical=
    Disallow: outlook-ical=
    Disallow: related_series=
    Disallow: tribe_geofence= Allow: /events/*
    Allow: /event/* Sitemap: https://sancarloslife.com/sitemap_index.xml

    I found the following php scripts from other support threads here:

    function my_custom_tribe_events_no_index_meta() {
    if( is_single() && ‘tribe_events’ == get_post_type() ) {
    add_filter( ‘tribe_events_add_no_index_meta’, ‘__return_false’ );}
    }

    add_action( ‘wp’, ‘my_custom_tribe_events_no_index_meta’ );

    and

    add_filter( ‘tribe_events_add_no_index_meta’, ‘__return_false’ ); <<<< This used to work before but doesnt anymore

    and others in the support forums but they dont work,

    In our staging site we disabled all plugins and went to 2020 theme, and I have the old php workarounds there but nothing seems to work…

    https://scldevelop.wpenginepowered.com/event/growing-california-wildflowers-with-master-gardeners-2023/

    Do you have a new workaround for this? I tried searching for noindex in your forum and it seems other people have had the same problem, it was also identified as a bug in one of your threads but I cant seem to see it in your bugs and issues page?

    Thanks so much

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Darian

    (@d0153)

    Hi @rachbeginner

    Thanks for reaching out.

    Could you try adding the following snippet and see if that makes a difference?

    add_filter( 'tribe_events_add_no_index_meta', function() {
    	if ( is_singular( "tribe_events" ) ) {
    		return false;
    	}
    });

    Moreover, I tried checking the page you provided but it’s not available at the moment. If you do have a new staging site that I could check, that would be very helpful.

    https://share.zight.com/yAun2rEe

    Looking forward to your reply.

    Plugin Support Darian

    (@d0153)

    Hi @rachbeginner

    This thread has been inactive for a while, so we’ll go ahead and mark it Resolved. Please open a new thread if any other questions arise, and we’d be happy to help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘noindex issue with single events’ is closed to new replies.