• Resolved mrmaker

    (@mrmaker)


    Hi guys,

    I am new to wordpress and have created a website which shows products (each product is one toggle) but i am puzzled by how to have the ajax search engine only search through those toggles. I now tried to solve it with custom fields but I dont seem to understand as most resources about custom fields are not related to searchs.

    If anyone feels like saving my day, I would be more than grateful ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi!

    I’m not sure I understand the toggle part, to be honest. Can you perhaps link me to a page where I can see these, or have a screenshot/video attached of it?

    I suspect you want to search through products and product attributes, but I’m not sure ??

    Thread Starter mrmaker

    (@mrmaker)

    I used the divi builder to create toggles. Each toggle represents one product. The page is cosmetic.mianguangroup.com. Thanks in advance for your time!

    Plugin Author wpdreams

    (@wpdreams)

    Hi!

    Oh okay, I think I understand now. So the products are not actual individual post type objects, but created as toggle elements on a page.

    I’m afraid this is not possible to search for, as the products are not custom post types, but part of one single page (as text or shortcode). The plugin can only look for posts, pages and any custom post type, that is separate in the WordPress database.

    I would suggest an alternative plugin or solution, but I’m not aware of any plugin capable of this, unfortunately.

    May I add my experience to this? Created a very large site using divi, using toggles (accordions) a lot. That was a mistake. Using the relevanssi plugin (a different search plugin) I was able to index the content of the toggle shortcodes, so I could find the page containing the toggle with the content searched. However, opening the right toggle requires user interaction – that is not done by the search page or any plugin. Neither the supporters at divi or relevanssi had any idea how to solve this, and admittedly, my design choice was a bad one.

    So in short – avoid toggles (or tabs, or accordions) if you need their content indexed by search.

    Thread Starter mrmaker

    (@mrmaker)

    Thanks. Not the answer I was hoping for, but I can tell you are three steps ahead of me and appreciate that you share your experience.

    What elements would you suggest for my project given the fact that toggles, tabs and accordions are not a viable option?

    Thanks in advance @oldrup

    Oh mrmaker, I can see a lot of hours have gone into that product page. But as @wpdreams said, its one large page. WP search only shows which page your search terms is located on (and not expanding the toggles).

    Was it my project, I’d go with WooCommerce first alternatively custom post types. You’ll need to copy and paste all your products into woo, but it will give you much more flexibility in regards of publishing your products.

    Divi is a great theme and flexible theme with many features, its easy to find a path that seems viable but really isn’t.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Search engine for custom fields’ is closed to new replies.