WordPress.org

Ready to get started?Download WordPress

Forums

Related Links
[resolved] Multiple instances? (3 posts)

  1. redone975
    Member
    Posted 1 year ago #

    Is there any way to expand this plugin to allow for multiple instances of this plugin within a page?

    For example, one instance would display related pages (only). While other instances would display related custom post types such as "Whitepapers", "Case Studies", etc

    This way I would have more control of their front-end display instead of lumping them into one related information area.

    http://wordpress.org/extend/plugins/related-links/

  2. redone975
    Member
    Posted 1 year ago #

    I create a quick mockup to demonstrate the idea... In this scenario, it shows an instance for related Pages and one for a custom post type called "Whitepapers"

    http://swept.co/_dev/related-link-expanded.png

  3. redone975
    Member
    Posted 1 year ago #

    This is what I was looking for:

    <?php $related_links = get_related_links('page'); ?>
    <ul>
        <?php foreach ($related_links as $link): ?>
            <li><a href="<?php echo $link['url']; ?>"><?php echo $link['type']; ?>: <?php echo $link['title']; ?></a></li>
        <?php endforeach; ?>
    </ul>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic