• Resolved leviracz

    (@leviracz)


    Hey, I have a single page with a shortcode on it, it’s mydomain.com/docs. “mydomain/docs/any/thing/can/go/here” is redirected to mydomain.com/docs, and the shortcode content varies on the current URI. Is it possible to index all my “subpages” when they’re technically attached to a single post?

    All these urls pop up properly in RankMath sitemap if that helps. I would need a solution that can index this dynamic content and keeps the original, full url.

    I have Relevanssi Premium.

    Thanks

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

    (@msaari)

    Answered in the Premium support.

    (In short: no. Relevanssi indexes posts in the database, not URLs on your site.)

    Thread Starter leviracz

    (@leviracz)

    Hi @msaari, thanks for your quick answer. I rather ask my next question here, because it might help others too. Is this planned in the future or is it technically possible at all?

    I believe the ability to add 3rd party urls to the index with custom, searchable content via a hook would solve my problem.

    This seems like a feature that could be used in other cases too.

    What do you think?

    Plugin Author Mikko Saari

    (@msaari)

    You can do this by creating a custom post type so that there’s a post for each third-party URL. Fetch the URL content and store it in the custom post, then have Relevanssi index that custom post type and replace the URLs in permalinks so that they point to the outside URLs.

    That way, this is possible. Relevanssi won’t have built-in support for this because it’s way too much trouble, but if you really need it, that’s the way to do it.

    Simply indexing outside URLs will never be possible; that’s a WordPress restriction, as Relevanssi uses the WordPress search result template, which can only display posts. That’s why everything must be represented by a post.

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

The topic ‘Index variable shortcode content’ is closed to new replies.