• Resolved noratom

    (@noratom)


    Hi, is it possible to exclude certain page content from search with this plugin?
    I have a banner on a page that links to another page. When I search for the page the banner is on, the default WP search show both the page and the pge the banner links to.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Yes. Relevanssi has a shortcode noindex you can use to exclude content from search, anything wrapped inside the noindex shortcode will be excluded from the Relevanssi index.

    You can also filter everything that goes in the index without any modifications to the pages by writing a filter function on the relevanssi_post_content filter hook.

    Thread Starter noratom

    (@noratom)

    nice! Thanks ??
    too difficult for me though, that’s why I use plugins….

    Plugin Author Mikko Saari

    (@msaari)

    Well, the noindex shortcode is your friend then, you just have to edit your pages. Since this is a custom thing, there’s no non-code solution that could be installed as a plugin, it has to be customized to your use case.

    (If you show me what the banner looks like, I can give you the filter function code, it’s just couple of lines of code.)

    Thread Starter noratom

    (@noratom)

    Plugin Author Mikko Saari

    (@msaari)

    Thanks. How does the banner look like in the actual raw post content?

    Thread Starter noratom

    (@noratom)

    Hi Mikko,

    I’m sorry, the page is still under construction, so I can only send you screenshots

    Plugin Author Mikko Saari

    (@msaari)

    Since you’re running Relevanssi on the site, it must exist. Just copy and paste from the post edit page from the HTML view. Screenshot doesn’t help, I need the actual code in a form I can copy and paste myself.

    Thread Starter noratom

    (@noratom)

    Hi there,

    ooooww sorry, I was thinking of switching to Relevanssi but needed to know the above was possible before I would.
    So, will switch first and then come back to you is that ok?

    Plugin Author Mikko Saari

    (@msaari)

    Yes, let’s do that.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘excluding certain page content’ is closed to new replies.