Enhancement: Post Terms Without Links
What?
- Added a new block attribute called "isLink" (boolean)
- Added a new block attribute called "linkTarget" (string)
- Removes the terms links on block SSR and wraps the names of the terms in "span" tags (for styling purposes and also differentiate from separator) when the "isLink" attribute is false
Related to #50904
Why?
- When using terms that should not link to archives, there is no option to remove the links from the terms output.
How?
- A new optional attribute
Testing Instructions
- Add categories to a post.
- Insert the "Post Category" block in the post content.
- Use the new toggle that appears in the "Advanced" panel from the sidebar.
Testing Instructions for Keyboard
Screenshots or screencast
Thank you for working on this.
Small note: When we add a block attribute, the documentation needs to be updated. The command to update the documentation is: npm run docs:build
@carolinan, thank you for the feedback! Will look into replacing the code with the get_the_terms() as you suggested and see if that makes it better.
@carolinan, your idea is better from both perspectives. Since we already get the post terms a few lines above in the code, we can reuse that, and also safer for output like that. Thanks! Please check again.
Hi! It's been a while since working on this, so I rebased the code to be up to date with the trunk. It's ready again for picking up the conversation if anyone has availability. Thanks!
Hi! It's been a while since working on this. It's ready again for picking up the conversation if anyone has availability. Thanks!
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: Sisanu <[email protected]>
Co-authored-by: carolinan <[email protected]>
Co-authored-by: krstivoja <[email protected]>
Co-authored-by: t-hamano <[email protected]>
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.
Hi @Sisanu the merge conflicts need to be solved.
@carolinan, the branch has been rebased and is ready for resuming the review. Thanks!
To match other similar options, I still think it would be better to move it out of the Advanced section.
The author name for example also links to the author archive by default, and it shows the link setting as enabled by default:
@carolinan, similar attributes have been applied to the block, as per your suggestion. Please review. Thanks!
Any updates on this?
@krstivoja All code changes and conversations are public, so if there are none listed here, then there are no updates.
If you scroll down to the test results, this PR is failing two tests and it has a merge conflict. These must be resolved.
If you scroll down to the test results, this PR is failing two tests and it has a merge conflict. These must be resolved.
That is a consequence of not receiving any feedback for months, after making the changes suggested in the previous comments. If only rebasing the code would unblock this from getting attention, I will do that soon. Is there some more suggestions you have @carolinan, to include these in the next push if any?
I am not able to do take it on, and I can't speak for anyone else.
Thanks @carolinan for clarifying it
@carolinan, @krstivoja, this is done, just letting you know of the development. My terrible rebase 😅 triggered review requests from more people, it wasn't intentional and I apologize for the SPAM cascade, I know everyone is busy.
Nice. Really appreciate the heads up!
It's ready again for picking up the conversation if anyone has availability. Thanks!