• Resolved magdat

    (@magdat)


    Hello,
    my blog is based on posts which include recipes. I’m using a recipe plugin x WP. The recipe can be included into the article only by a recipe shortcode ex. [cooked-recipe id=”1″].
    Because of that I had a problem with double content (2 pages: 1 with recipe; 1 with recipe inside a post) while using the search bar, which seems to be solved thanks to Relevanssi but now my problem is that the RECIPE INSIDE A POST IS NOT INDEXED so the search is not giving results for the recipe excerpt, ingredients and cooking steps.

    Is there any way to solve this problem?

    Thank you

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

    (@msaari)

    Is “Expand shortcodes when indexing” enabled in Relevanssi indexing settings? If not, enable and rebuild the index. Does that fix the problem?

    If it is enabled, then it’s possible the recipe shortcode is not compatible with Relevanssi – that’s not uncommon for shortcodes that embed posts within posts.

    Thread Starter magdat

    (@magdat)

    Hello! The option is enable and seems change anything… The recipe plugin is Cooked and it was already a part of the theme. I was advised by the theme creator to install relevanssi but if the recipe shortcodes are not compatible I really don’t know how to solve the problem.

    Is any way to verify the compatibility?

    Thanks

    Plugin Author Mikko Saari

    (@msaari)

    I checked, and it’s simple: Relevanssi can index the recipe posts, no problems there, but indexing the shortcode content is just not possible.

    The authors of the Cooked plugin have made it very strict: there’s no chance the shortcodes can be used in admin context, only in front-end. Unfortunately Relevanssi indexing happens in admin context. Thus, when Relevanssi tries to expand the shortcodes in indexing, the Cooked plugin has them disabled.

    Unfortunately this is a problem that is quite difficult to solve. It’s not impossible: you could fetch the recipe post ID from the shortcode, then fetch the recipe information you need using that post ID and add it to the parent post in Relevanssi indexing without using the shortcode, but it does require PHP skills.

    The easiest solution would be to have the Cooked developers lift the restrictions and make the shortcodes available also in admin context.

    Thread Starter magdat

    (@magdat)

    That’s very helpful! I’ll try to contact the plugin developers. But I don’t think there will be anything to do…

    Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No indexing recipes inside articles’ is closed to new replies.