Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Conversation

@eliorivero
Copy link
Contributor

Description

This solves the issue where the Portfolio Homepage template was showing multiple "No posts were found." messages. By using the placeholder we can show this message only in the editor and avoid displaying it on the front end.

Screenshots

Used two languages, Spanish and German, to better highlight what's text produced by WordPress (the localized text) and which one was the fixed text from the pattern (text in English).

Previously, the editor was showing multiple "No posts were found."

Screenshot 2024-09-24 at 23 35 04

Which were also visible on the front end

Screenshot 2024-09-24 at 23 36 18

With this approach, the messages are shown as placeholders in the editor

Screenshot 2024-09-25 at 00 42 36

and the messages aren't visible on the front end

Screenshot 2024-09-25 at 00 30 04

Testing Instructions

  1. Activate the theme.
  2. Add a page.
  3. Select the Portfolio Homepage pattern.
    Screenshot 2024-09-25 at 00 46 45
  4. Verify the placeholders are there.
  5. Publish the page and check on the front end that the placeholders aren't visible.

This solves the issue where this template was showing multiple "No posts were found." messages.
By using the placeholder we can show this message only in the editor and avoid displaying it on the front end.
@github-actions
Copy link

Preview changes

You can preview these changes by following the link below:

I will update this comment with the latest preview links as you push more changes to this PR.
⚠️ Note: The preview sites are created using WordPress Playground. You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions.

@github-actions
Copy link

github-actions bot commented Sep 24, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: eliorivero <eliorivero@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@carolinan
Copy link
Contributor

Question: what is the benefit of keeping the blocks with the placeholders in the editor?

I think it is best to keep the message on the first query visible on the front. 🤔 Otherwise the page will say "...these are some..." and then there is nothing, without an explanation.

@eliorivero
Copy link
Contributor Author

IMHO the benefit is that the users are made aware that there's a position there to insert content.

@carolinan
Copy link
Contributor

@eliorivero Thank you for working on this. Since there is no consensus on if these should be changed or not, and because the time until the release is short, I am going to close this PR.

@carolinan carolinan closed this Oct 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants