[Resolved] No search results

  • Author
    Posts
  • #8705

    Eelco Dekema
    Participant

    Hi,

    My polestar theme doesn’t give ANY search results, both regular WP posts and PageBuilder posts.

    Help!

    #8706

    Andrew Misplon
    Keymaster

    Hi Eelco

    Thanks for posting.

    That’s unlikely to be theme related. To confirm, briefly switch a default theme like Twenty Sixteen and try again. If the issue persists, you’ll know it isn’t theme related. Next, keep the default theme activated and disable all plugins in one go except for Page Builder. Test your search, does the issue persist. If the issue is resolved you’ll then know a plugin is the issue and can begin a plugin conflict test. This is how to start troubleshooting the problem.

    Resolving Plugin Conflicts

    #8707

    Eelco Dekema
    Participant

    Hi,

    So I’ve tested with a default theme and voila, all results are shown…
    Switching back to Polestart the results are back to zero.

    The default theme had the same plugins activated as the Polestar theme.

    #8708

    Andrew Misplon
    Keymaster

    Super, that’s progress. Have you modified Polestar?

    Please, send a link so we can take a look.

    #8709

    Eelco Dekema
    Participant
    This reply has been marked as private.
    #8710

    Andrew Misplon
    Keymaster

    Assuming you’ve done all of your modifications from within a child theme please switch to the parent theme and test the search.

    #8711

    Eelco Dekema
    Participant

    Already did, but still no search results!

    The searchfunction stops working the moment I switch to polestar

    #8712

    Andrew Misplon
    Keymaster

    By default the theme’s search does work you can see this in the demo.

    Have you modified the parent theme?

    Please also try testing the parent theme with only SiteOrigin plugins activated.

    With the parent activated, check the developer console for any JS errors.

    Are you searching using the header search field or a search widget?

    Please try answer all of the above points. I can take a look at your site when I get back to a computer.

    #8713

    Eelco Dekema
    Participant

    I’ve found something…

    I installed my wordpress in a subdirectory.. when I preform a search action it actually loads the page within the subdirectory (https://domain.com/subdir/?s=test). when I edit the URL to https://domain.com/?s=test it will show the results!

    #8714

    Eelco Dekema
    Participant

    I’ve fixed it by editing searchform.php in the Polestar theme…

    I changed
    <form method=”get” class=”search-form” action=”<?php echo esc_url( site_url() ) ?>”>
    to
    <form method=”get” class=”search-form” action=”<?php echo esc_url( ‘https://domain.com&#8217; ) ?>”>

    now it requests the root and not the subdirectory aka shows the results!

    #8715

    Andrew Misplon
    Keymaster

    Nicely done. Please be sure to have this change in your child to make it update safe and you’re good to go!

    All the best.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

Scroll to top