Skip to content

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

Closed

Description

@MaggieCabrera

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

Activity

  1. added
    [Type] Enhancement
    [Block] Post Navigation Link
    on Feb 17, 2021
  2. mtias commented on Feb 25, 2021

    @mtias
    Member

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

  3. MaggieCabrera commented on Feb 25, 2021

    @MaggieCabrera
    ContributorAuthor

    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

  4. ntsekouras commented on Feb 25, 2021

    @ntsekouras
    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 🤔

  5. mtias commented on Feb 25, 2021

    @mtias
    Member

    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.

  6. MaggieCabrera commented on Feb 25, 2021

    @MaggieCabrera
    ContributorAuthor

    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

  7. self-assigned this
    on Sep 17, 2021
  8. added
    [Status] In Progress
    on Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Block] Post Navigation Link[Status] In Progress[Type] Enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions