Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MOOSE-48] Query Results Count Block #65

Merged
merged 3 commits into from
Jul 28, 2023

Conversation

GeoffDusome
Copy link
Contributor

What does this do/fix?

NOTE: This PR is dependent on 3 other PRs: Post Card Patterns, Post Type Name Custom Block, Post Permalink Custom Block.

  • adds Query Results Count Block
    • only works on archives / search templates. It doesn't seem possible to get query block contexts in inner blocks. This may be what Justin was mentioned on QCHI at one point.
    • if on the Search page, will check for the search query and append that onto the results count.
    • otherwise, will just display "x results" (this can be easily updated)
    • seems to always display "0 results" in the editor (likely because we don't have the $wp_query context)
  • updates Search Results template with new Search Results Posts patterns & Query Results Count Block

QA

Links to relevant issues

Screenshots/video:

Copy link
Collaborator

@dpellenwood dpellenwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change to PHP strings, but looks good!

Co-authored-by: David Paul Ellenwood <[email protected]>
Base automatically changed from s3/MOOSE-47/post-permalink-custom-block to main July 28, 2023 17:16
@GeoffDusome GeoffDusome merged commit 6ee433c into main Jul 28, 2023
7 checks passed
@GeoffDusome GeoffDusome deleted the s3/MOOSE-48/query-results-count-block branch July 28, 2023 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants