Support » Plugin: Related Links » Meta box
3 years, 11 months ago
Is it possible to extend the plugin to acquire a value from a meta box for a custom post type?
I’d like to use a URL from the meta box instead of the permalink.
Meta box ID:
3 years, 10 months ago
the related links function returns an array. every array item also includes the post_id. just make a meta-query with this post_id and the meta-name.
Thanks for the reply… I was able to solve it by using the code similar to this:
<?php $related_documents = get_related_links('documents'); ?>
<?php foreach ($related_documents as $rdocument): ?>
<li><a href="<?php echo get_post_meta($rdocument['id'], 'ecpt_wp-pdf-document', true); ?>"><?php echo $rdocument['title']; ?></a></li>
<?php endforeach; ?>