• Resolved Rico

    (@nascas)


    Dear creators,

    Thank you for this wonderful plugin, it’s really delightful.
    However I’ve noticed one thing that keeps bothering me. When I use search for the published post it returns some Envira galleries as well. When I click on it I got 404 error. Is there a way to prevent search from including Envira galleries?

    Thank you and have a nice day!

Viewing 14 replies - 1 through 14 (of 14 total)
  • akyusa01

    (@akyusa01)

    Hi @nascas πŸ™‚

    Thank you for the kind comments! πŸ™‚ Can you please go into your WordPress admin and go to Settings >> Permalinks and click Save again to flush the permalinks to see if that helps?

    Thread Starter Rico

    (@nascas)

    Hi,
    Thanks for your reply.
    I went to settins->permalinks, changed some settings and saved them (as they were before) but the problem is still there.
    When I hit search there is still an Envira project. When I click on it I get a 404 page and the url link is /?post_type=envira&p=12137.

    Thread Starter Rico

    (@nascas)

    Hi again,

    I also noticed that Google indexes gallery entries/attachments as well.
    http://www.domain.com/?attachment_id=1811

    Other attachments that are not a part of Envira Gallery are not indexed or seen in search engine.

    Do you think there is a way we could eliminate this?

    Anonymous User

    (@anonymized-5837566)

    Hi @nascas,

    You should be able to no-index the Envira custom post types and attachments with:

    https://wordpress.org/plugins/all-in-one-seo-pack/

    Thanks

    akyusa01

    (@akyusa01)

    Hi πŸ™‚

    Ok, I see what’s happening here.

    Envira doesn’t provide a custom post template for galleries and albums. But when using the standalone feature, Envira will use your theme’s single.php.

    If doing a custom URL query (as shown above with the /?post_type=envira&p=12137, since there isn’t a page template in your theme for those CPTs it’s returning a 404 error.

    You’d need to create custom page templates for Envira and if using albums for Envira Albums as well and then have a custom loop on that page template.

    You can read more about custom page templates here:

    https://enviragallery.com/docs/how-to-create-a-custom-template-for-albums/
    https://enviragallery.com/docs/how-to-create-a-custom-template-for-galleries/

    Thread Starter Rico

    (@nascas)

    Hi akyusa01,

    Thanks for your reply. πŸ™‚
    Do you think I could prevent indexing by adding an exception in robots.txt file?

    How will a custom page template prevent site search from returning existing galleries?

    Thread Starter Rico

    (@nascas)

    Oh, wait, I think there is an option in YOAST SEO “Redirect attachments URLs to the attachment itself” that should be set to off.

    EDIT: that didn’t prevent Google from indexing attachments but it’s showing the image instead of a page with a thumbnail. Better than before but still not happy about it.

    • This reply was modified 8 years ago by Rico.
    • This reply was modified 8 years ago by Rico.
    • This reply was modified 8 years ago by Rico.
    akyusa01

    (@akyusa01)

    Hi @nascas πŸ™‚

    Do you have the Standalone option enabled on Envira under Envira Gallery >> Settings >> Standalone tab?

    Thread Starter Rico

    (@nascas)

    I don’t see settings. I’m using free version, perhaps you’re talking about upgraded one?

    Anonymous User

    (@anonymized-5837566)

    Hi @nascas,

    If you’re looking to simply hide images from search engines flat out, you might try this approach:

    https://support.google.com/webmasters/answer/35308

    Thanks

    Thread Starter Rico

    (@nascas)

    Thanks, I did that.
    But that doesn’t solve showing Envira Galleries when doing a site search …

    Anonymous User

    (@anonymized-5837566)

    I see.

    You might want to give this plugin a try, which will let you refine the search and even exclude things:

    https://wordpress.org/plugins/relevanssi/

    Thread Starter Rico

    (@nascas)

    Hi,
    Thank you for this. It looks like this is the thing I’m looking for.
    I see you have to build the index first but then the posts/pages are added automatically.

    Anonymous User

    (@anonymized-5837566)

    You’re welcome. πŸ™‚

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

The topic ‘404 Search results’ is closed to new replies.