Forums

[resolved] [Plugin: WP Favorite Posts] How to add favourites to template (5 posts)

  1. rainemaida
    Member
    Posted 9 months ago #

    I have the add to favourites working well on my single.php page but instead of making a new page for the favourites I just wanted to add it to my home page.

    What would the code be for this as {{wp-favorite-posts}} just shows up as text.

    Thank you,
    Steve

  2. MichaelH
    moderator
    Posted 9 months ago #

    In whatever template is used for your home page, such as your theme's index.php file, put:

    <?php if (function_exists('wpfp_link')) { wpfp_link(); } ?>
  3. rainemaida
    Member
    Posted 9 months ago #

    Sorry I mean't that I wanted to put a list of the favourites in the template.

  4. MichaelH
    moderator
    Posted 9 months ago #

    Not understanding you there.

  5. rainemaida
    Member
    Posted 9 months ago #

    What you supplied to me simply allows someone to add or take away a post from their favourites.

    Well I wanted to show what was in their favourites in a template.

    I've done it now, here's how I did it for anyone wondering.

    <?php list_favorite_posts(); ?>

Reply

You must log in to post.

About this Topic