Skip to content

Fix: Add muted Next and Previous links as fallback#69995

Open
Rishit30G wants to merge 2 commits intoWordPress:trunkfrom
Rishit30G:fix/next-and-previous-post-button
Open

Fix: Add muted Next and Previous links as fallback#69995
Rishit30G wants to merge 2 commits intoWordPress:trunkfrom
Rishit30G:fix/next-and-previous-post-button

Conversation

@Rishit30G
Copy link
Contributor

What?

Closes #69994

Why?

This PR is necessary to add muted 'Next' and 'Previous' links instead of not rendering any content on the frontend when Post Navigation Link Block is added to the first or the last post.

How?

This PR introduces a default $content which has Next and Previous Text along with the arrow

Testing Instructions

  • Add a new post
  • Add the Next Post Block to it
  • Save the post and check the frontend
  • Notice now that the Next text is rendered in the muted state instead of not appearing at all

Screenshots or screencast

Screen.Recording.2025-04-28.at.11.55.18.AM.mov

@github-actions
Copy link

github-actions bot commented Apr 28, 2025

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: Rishit30G <rishit30g@git.wordpress.org>
Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org>

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

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. Needs Accessibility Feedback Need input from accessibility [Block] Post Navigation Link Affects the Post Navigation Link Block labels Apr 28, 2025
@Infinite-Null
Copy link
Contributor

Hi @Rishit30G, I tested this PR and it works well for me 👍 :

image
image

I noticed that there are a few PHP coding standards issues that need to be addressed.

@Rishit30G
Copy link
Contributor Author

Thanks @Infinite-Null for testing the changes!
I have resolved the PHPCS issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Post Navigation Link Affects the Post Navigation Link Block Needs Accessibility Feedback Need input from accessibility [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Post Navigation Block: Add muted Next and Previous links as fallback

3 participants