Hiding the actual tickets from WordPress search engine

Home Forums Ticket Products Event Tickets Plus Hiding the actual tickets from WordPress search engine

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1187663
    Barbara
    Participant

    Hi all,

    I was quite shocked to see that the tickets are visible in the WordPress search engine (see http://www.triggr.nu/?s=pubquiz), almost all records are the tickets for the 4, 5 and 6-people teams, which is very confusing to say the least.

    Can I hide these from the WP search engine?

    Thanks,

    #1188068
    Josh
    Participant

    Hey Hans,

    Thanks for reaching out to us!When

    When looking at the associated WooCommerce products created when creating tickets for events, does the information box to the side have the “Catalog Visibility” setting set to “Hidden”? for your tickets? https://cloudup.com/cklxihPNMkH

    Thanks!

    #1188087
    Barbara
    Participant

    Hi Josh,

    Yes, it’s set to ‘Hidden’ for all tickets I checked just now, and they’re still showing up in the WP standard search.

    Best regards,
    Hans

    #1188571
    Josh
    Participant

    Hey Hans,

    Take a look at this snippet and see if it helps you out here:

    https://gist.github.com/BeardedGinger/69a6078078164ca01514ddb0c15073e0

    You can add that to your child theme’s functions.php file or use a plugin such as https://wordpress.org/plugins/code-snippets/

    Let me know if this helps.

    Thanks!

    #1191295
    Barbara
    Participant

    Hi JOsh,

    Thanks for your help!
    I applied the code to the functions.php file, but now the WP search engine cannot find anything anymore! The event pages themselves cannot be found anymore, even searching for the most common term on the site (“triggr”) now returns zero results!

    I have disabled the snippet for now. Hopefully you’ll have a clue where this went wrong?

    Thanks,
    Hans

    #1191779
    Josh
    Participant

    Hey Hans,

    Thanks for following up.

    After I posted the snippet, I realized that I forgot to add that final line there within the function for “return $query;” which would be causing the issues you’re describing. I updated that last week but it may have been after you already saw the snippet and added to your site.

    Try the updated snippet above and see if that works for you here.

    Thanks!

    #1194463
    Barbara
    Participant

    Hi Josh,
    Yeah, I used that version of the snippet. Just tried it again to be sure, but got the same results (no results… 😉

    Hans

    #1195290
    Josh
    Participant

    Hey Hans,

    Sorry about the miss there, here is an updated snippet that should work better here:

    https://gist.github.com/BeardedGinger/69a6078078164ca01514ddb0c15073e0

    Let me know if this helps.

    Thanks!

    #1197692
    Barbara
    Participant

    Josh,

    You are awesome! This did the trick, much appreciated! This should be an extra option in the settings tab for all users to enjoy! I can’t imagine many people wanting to have this happening to their tickets… 🙂

    Cheers,
    Hans

    #1198260
    Josh
    Participant

    Hey Hans,

    No problem, happy to help!

    Definitely, we piggyback on the WooCommerce hidden products feature there. It is odd that those are showing in the search results but doing some research there it does appear that it has come up a few times and may be adjusted on their end sometime in the future.

    I’ll go ahead and close this thread for now. If you have any further questions, please don’t hesitate to open a new one.

    Thanks!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Hiding the actual tickets from WordPress search engine’ is closed to new replies.