Skip to content

Post Template. Return No results found in PHP to match JS.#36225

Closed
iandunn wants to merge 1 commit intoWordPress:trunkfrom
iandunn:fix/post-template-empty
Closed

Post Template. Return No results found in PHP to match JS.#36225
iandunn wants to merge 1 commit intoWordPress:trunkfrom
iandunn:fix/post-template-empty

Conversation

@iandunn
Copy link
Copy Markdown
Member

@iandunn iandunn commented Nov 4, 2021

Description

Fixes #36224

How has this been tested?

Ran the reproduction steps in #36224 before and after the change.

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@iandunn iandunn requested a review from ajitbohra as a code owner November 4, 2021 18:54
@iandunn iandunn force-pushed the fix/post-template-empty branch from b9ae62a to 7e9a24a Compare November 4, 2021 19:45
@carolinan
Copy link
Copy Markdown
Contributor

The pull request works as described, it adds the No results found. text to the front.

This works well for search result pages, but it needs to be optional because it does not work well in other scenarios:

  • "Magazine" layout with multiple queries.
  • Homepage with one design for sticky posts and one for standard posts.
  • A query for latest posts (not the latest post blocks) in a site footer.
  • A block pattern that displays a query for a specific category, part of a larger design.

Related: #32606
Additional comments on implementation:
#33523 (review)

@t-hamano
Copy link
Copy Markdown
Contributor

I'm closing this PR since it seems to have been resolved by #38806.

@iandunn Thank you for working on this issue!

@t-hamano t-hamano closed this Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Post Template Affects the Post Template Block

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Post Template returns empty string when no results found

4 participants