I am looking for some direction here as I am unsure where to start. I have a CPT called 'videos' and one of my inputs is a 'artist_bio' text box that creates a box with a biography in it on my page.

<div class="bio">
    <?php the_field('artist_bio'); ?>

My client is asking if that biography can be an excerpt of what is entered with a read more link that takes you to a new page where more information beyond the biography lives. I'm unsure of how to get started, I have a authors link on the page that takes you to an authors page using author.php where more information on the author lives. This is how I get the authors link:

<?php the_author_posts_link(); ?>

I would like to mimic that set up but I'm not sure how?

  • You'd want to create a custom post type, or taxonomy, for artist. artist could contain an excerpt, and whatever else. In video, on the admin side, you'd create a relation to a post in artist. When viewing a video on the front end, you'd call the relation, get artist where related to current video and show the artist excerpt, with a link to the artist. – David Sword Apr 24 '18 at 22:32
  • Thank you very much! I am using the Advanced Custom Fields plugin and they have a relationship field option so I was able to use that to get this to work. Much appreciated for your help in steering me in the correct direction. – jessica mele Apr 25 '18 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.