You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the standard WP search where a modularity module contains hits, one of the search results will be lost when using the while(have_posts()): the_post() syntax.
Error is caused due to global $post; already containing the first search hit when the code enters while(have_posts()). Calling the_post() will result in WP fetching the second search result. If just one result is found the page renders as if no results were found.
The text was updated successfully, but these errors were encountered:
Using the standard
WP search
where a modularity module contains hits, one of the search results will be lost when using thewhile(have_posts()): the_post()
syntax.Error is caused due to
global $post;
already containing the first search hit when the code enterswhile(have_posts())
. Callingthe_post()
will result in WP fetching the second search result. If just one result is found the page renders as if no results were found.The text was updated successfully, but these errors were encountered: