Conversation
supportIs 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: ecpt_wp-pdf-document Thanks. http://wordpress.org/extend/plugins/related-links/
Anyone?
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: <ul> <?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; ?> </ul>
Anyone?
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: <ul> <?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; ?> </ul>