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

[Block: Post Navigation Link] Add the ability to have both the text title and the label be a part of the link #29032

Closed
MaggieCabrera opened this issue Feb 16, 2021 · 5 comments · Fixed by #34952
Assignees
Labels
[Block] Post Navigation Link Affects the Post Navigation Link Block [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@MaggieCabrera
Copy link
Contributor

What problem does this address?

It is a common pattern on themes to have the Previous/Next links show both a label and the title of the post while both being part of the link to said post. Usually when using get_the_post_navigation() this is a possibility but it's not an option when doing so using this block.

What is your proposed solution?

I'm not sure what the best implementation would be for this, but thinking about how this is done on classic themes I believe if would help if it would be possible to show a placeholder for the title in place with the label when the block has the flag to show the title. Then both the Label and the Title are part of the block and can be positioned using the editor (such as having a line break between the two)

That way we can achieve something like this:

Screenshot 2021-02-15 at 14 58 07

@mtias
Copy link
Member

mtias commented Feb 25, 2021

This seems like it should be a toggle with a default design in place?

@MaggieCabrera
Copy link
Contributor Author

This seems like it should be a toggle with a default design in place?

Mmh, that's a possibility, but it would be more flexible if we could edit both the label and the title within the editor, so we could not only decide on the line break but also if we want the text to be bold or not (like my example above). I was thinking of something like the "Read more" link on the excerpt block, for this case:

Screenshot 2021-02-25 at 10 55 16

@ntsekouras
Copy link
Contributor

I was thinking of something like the "Read more" link on the excerpt block, for this case:

The difference is that title is dynamic. Something similar is needed here: #27989 for Search Title.

Search title - a title that can be used in search templates, augmented with text replacements like %search% will be replaced by the search query in php.

I'm not sure how will handle this design wise though and if we should allow inline formatting then, as it could be done with css 🤔

@mtias
Copy link
Member

mtias commented Feb 25, 2021

It seems like the "next post" and "previous post" being rich text could support that kind of formatting and the titles are just the block typography settings. It'd be fine to also start with the above design as a baseline and then figure out how to add further tools.

@MaggieCabrera
Copy link
Contributor Author

For reference, my screenshot up top is from Mayland (Varia), and this is how Seedlet and TT1 does this:

Screenshot 2021-02-25 at 14 08 28

Screenshot 2021-02-25 at 14 09 48

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 [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
5 participants