logo
Ask your WordPress questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$75
Multiple Related Content Metaboxes

Working on a project that features a variety of related content... I ran across a very slick plugin that is very intuitive and easy to use called:

Related Links
by Triggvy Gunderson
http://wordpress.org/extend/plugins/related-links/

However, instead of pulling in all types of content into this feature (pages, posts, custom post types, etc) like this plugin does, I would like to create multiple instances of this plugin within the admin side where each instance focuses on a specific type of content.

For example, one instance pulling in only pages for a "Related Pages" section on the front-end... Another one instance pulling in a custom post type called "whitepaper" for a "Related Whitepapers" section on the front-end... This way I have more control over how these related items are displayed in the front-end, instead of listing all of these related items in the same list as the above plugin does.

I did a quick mockup to show how this plugin would look like in this scenario:
http://swept.co/_dev/related-link-expanded.png

OR, If someone can give me some insight in how to add a metabox that features a multi-select form that pulls in a specified type of content (for example, all pages only), and allows the user to select multiple pages from this section and display them in a list on the front-end ...

Any help would be greatly appreciated.

This question has been answered.

Michael Brumm | 02/07/13 at 5:04pm Edit
Tutorial: How to assign prize money


(4) Responses

See a threaded view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    02/07/13
    5:24pm
    Naveen Chand says:

    Below code is an example of an instance which generates links in whitepapers custom post type.


    <?php if(function_exists('get_related_links')) : ?>
    <?php $related_links = get_related_links('whitepapers'); ?>
    <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>
    <?php endif; ?>


    You can add this code at different places in your page template or sidebar template files. Each time you add, just remember to give unique variable names to $related_links and $link.

    This way you can generate any number of instances on the front-end.

  • avatar
    Last edited:
    02/07/13
    5:26pm
    Kyle says:

    I can see you are looking for a very custom solution, but thought I would show this if you haven't seen it as a money saving solution :)

    http://codecanyon.net/item/better-related-posts-widget/427853?sso?WT.ac=search_item&WT.seg_1=search_item&WT.z_author=mordauk

    You can choose any available taxonomy for each instance

  • avatar
    Last edited:
    02/07/13
    5:47pm
    Michael Brumm says:

    Thank you. Thank you. Thank you.

    This will work just fine... I was making it overly complicated.

  • avatar
    Last edited:
    02/07/13
    5:52pm
    Michael Brumm says:

    Sorry, haven't used this system in awhile and wanted to give Naveen credit specifically...

    Naveen Chand, you solved my problem without overly complicating things... I was unaware of this feature with this plugin... Again, many thanks.

This question has expired.



Gabriel Reguly, Michael Brumm, Christianto, Arnav Joy voted on this question.



Current status of this question: Completed



Please log in to add additional discourse to this page.





Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.