WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
Issue with Toggle Shortcode (6 posts)

  1. KatieKat
    Member
    Posted 1 year ago #

    Hi there,
    I had initial issues with Relevanssi running with bbpress but the searches now come back fine after I unchecked the "Respect exclude_from_search for custom post types" option. Many thanks for that.

    However I am now having a problem displaying a page that contains the toggle shortcode around questions and answers. The search comes back and displays "no posts match criteria" but when I go to the actual page concerned the search term is highlighted. It is clearly picking up the search term but not displaying it in the results.

    I really hope you can help.

    Kind Regards

    KatieKat

    http://wordpress.org/extend/plugins/relevanssi/

  2. Mikko Saari
    Member
    Plugin Author

    Posted 1 year ago #

    Ah, no. The highlighting has nothing to do with the search, so having the word highlighted doesn't mean Relevanssi is picking it up.

    What does the toggle shortcode do?

  3. KatieKat
    Member
    Posted 1 year ago #

    Hi there,
    the toggle shortcode is part of many themes and wraps text so that the user sees a question and when clicking on the question the answer is revealed. eg.

    [toggle title_open="How do I become a member?" title_closed="How do I become a member?"]
    Please go to the login form and we will assess your application.
    [/toggle]

    The title of the Question would appear with a link on the page that says "How do I become a member? On clicking the question /link it expands to reveal the answer "Please go to the login form and we will assess your application".

    Hope this makes sense. The following website also explains this in more detail.

    http://para.llel.us/themes/mingle-wp/shortcodes/tabs-and-toggles/

    Kind Regards

    KatieKat

  4. Mikko Saari
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm... Does Relevanssi index anything from the toggle? Content or the title? It depends on how the shortcode works, what it prints out when it's expanded with do_shortcode().

  5. KatieKat
    Member
    Posted 1 year ago #

    Apologies but I don't understand your reply. As far as I can see it is indexing the content which is why the word is highlighted when you open up the question or answer.

  6. Mikko Saari
    Member
    Plugin Author

    Posted 1 year ago #

    Forget the highlighting - that doesn't tell you anything about what Relevanssi is indexing or not. Relevanssi can highlight it, even when it's not being indexed.

    If you put a unique non-word (say "zrrrlllb") inside a toggle shortcode and save the post, can you find the post when you search for that word? What if you put the word in the toggle title?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic