Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Bug Reports
  3. Live search: ignores Polylang language and misses content matches

Live search: ignores Polylang language and misses content matches

Scheduled Pinned Locked Moved Bug Reports
4 Posts 2 Posters 30 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Josefdz
    wrote last edited by Josefdz
    #1

    Hi,

    My site is https://www.romnja-power.de — it's built with the Lay theme and uses the Polylang plugin for multiple languages. I have two related problems with the header live search.

    How the search behaves: it's a live/instant dropdown. As I type, the results appear below the input, and the only way to open a result is by clicking one. Pressing Enter does nothing and there is no full results page (no /?s=... page). The input has id="search-query" with no name="s", so it's the theme's own AJAX search, not the standard WordPress search.

    Problem 1 – language: no matter which language I'm browsing in, the dropdown only returns results in the default language. It never restricts results to the current Polylang language.

    Problem 2 – coverage: the search misses pages that clearly contain the words I'm searching for. It looks like it only matches titles, not the body content. Some of my content may also not be indexed at all.

    What I've already tried, so you don't have to suggest it:

    • Lay theme and addons are up to date.
    • I turned off all custom code via Lay Options → Custom CSS & HTML ("Turn Off All Custom Code") and the problem persists.
    • Enabling "Deaktiviere Ajax / Kompatibilitätsmodus" in the theme options changed nothing.
    • A custom pre_get_posts filter forcing the language onto AJAX search queries had zero effect, so the live search apparently doesn't run through the standard WP_Query.
    • The problem happens in Chrome and Firefox on desktop.

    My questions:

    1. Can Lay's live search be made to filter results by the current Polylang language? If so, how?

    2. Does the live search index the full post content (and custom fields / page-builder content), or only titles? Can it be made to search the full content?

    3. Can the three-result limit be increased?

    4. If any of this isn't configurable, what action/hook does your AJAX search expose so I can adjust the query myself? I'm comfortable adding a code snippet.

    Thank you for your help!

    Best regards,
    José

    1 Reply Last reply
    0
    • arminunruhA Online
      arminunruhA Online
      arminunruh
      Global Moderator
      wrote last edited by
      #2

      Does the live search index the full post content (and custom fields / page-builder content), or only titles? Can it be made to search the full content?

      What do you mean with custom fields? Have you added any custom fields via plugins where you enter additional text that is not part of Laytheme's functionality?

      1 Reply Last reply
      0
      • arminunruhA Online
        arminunruhA Online
        arminunruh
        Global Moderator
        wrote last edited by
        #3

        okay, so I'm working on all of these points, and you will have settings in Lay Options: Search settings Section

        Polylang will work. It will be possible to include pages in the search. It will be possible to include Gridder text elements in the search. If you include the text elements, the search will work via the Enter key. And then when you press the Enter key, you will get a URL that contains the search term that is shareable.

        All of these new settings will need to be enabled in the aforementioned settings section.

        Also, you will have some new settings in customize - search.

        1 Reply Last reply
        0
        • arminunruhA Online
          arminunruhA Online
          arminunruh
          Global Moderator
          wrote last edited by
          #4

          will be included with the next update

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          For paid 1-on-1 Lay Theme Coaching, contact Audrey (audrey@cyberslayers.work) or me (info@laytheme.com).

          We also code custom websites or bespoke Lay features. Drop me a line at info@laytheme.com or check out my work at arminunruh.com.

          Want to support my work? paypal.me/arminunruh

          Before you post:
          1. When using a WordPress Cache plugin, disable it or clear your cache.
          2. Update Lay Theme and all Lay Theme Addons
          3. Disable all Plugins
          4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

          This often solves issues you might run into

          When you post:
          1. Post a link to where the problem is
          2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
          3. If the problem is difficult to explain, post screenshots / link to a video to explain it
          Online Users
          arminunruhA
          arminunruh
          Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
          laytheme.com
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Search