Display related cpt permalink

Support MB Relationships Display related cpt permalinkResolved

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #22985
    EliodataEliodata
    Participant

    Hi,
    I am using bi-directional relationship between 2 custom post types. I followed these advices:

    https://docs.metabox.io/extensions/mb-relationships/#sibling-items

    Works great.

    But I would like the related cpt to be clickable. Please, how to display the related cpt link and open it into a new tab?

    Sorry for my poor english!

    #22989
    EliodataEliodata
    Participant

    Edit: I am using bi-directional relationship between users and custom post types!

    Thank you

    #22990
    Long NguyenLong Nguyen
    Moderator

    Hi,

    In the loop, you can use the function the_permalink() to display the link to the post. See the example code https://docs.metabox.io/extensions/mb-relationships/#posts.

    And to open the link in a new tab, you can add the attribute target="_blank" to the <a> tag .

    <a href="<?php the_permalink(); ?>" target="_blank"><?php the_title(); ?></a>

    #22993
    EliodataEliodata
    Participant

    Thank you for the very quick answer! I don't want to display the link on front end, but on the edit post / user relationship metabox.
    Maybe I didn't understood your answer, I am not a dev, sorry. And I would understood if this this question is beyond the scope of your support.

    #22996
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The plugin MB Relationships has not supported to link to the post selected on the backend yet. I'm going to create a feature request for the developer team to support this case.

    Thank you.

    #22999
    EliodataEliodata
    Participant

    OK. I guess is the same for my other post related to metabox relationship custom fields.
    FYI pods relationship feature adds a simple edit link near to the related items once selected. A similar solution would be nice.

    Best regards

    #37463
    John RoodJohn Rood
    Participant

    We are also looking for similar functionality and are wondering if there have been any updates on this, or if someone has found their own solution.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.