WordPress.org

Ready to get started?Download WordPress

Forums

WP Favorite Posts
Output whole content of favorited posts/pages? (2 posts)

  1. bento
    Member
    Posted 3 years ago #

    I would like to output the whole content of favorited posts/pages i.e. content, title, custom fields, but I don`t know how to customise the template "wpfp-page-template.php".

    This is what I am seeing:

    <?php
        echo "<div class='wpfp-span'>";
        if (!empty($user)):
            if (!wpfp_is_user_favlist_public($user)):
                echo "$user's Favorite Posts.";
            else:
                echo "$user's list is not public.";
            endif;
        endif;
    
        if ($wpfp_before):
            echo "<p>".$wpfp_before."</p>";
        endif;
    
        echo "<ul>";
        if ($favorite_post_ids):
            foreach ($favorite_post_ids as $post_id) {
                $p = get_post($post_id);
                echo "<li>";
                echo "<a href='".get_permalink($post_id)."' title='". $p->post_title ."'>" . $p->post_title . "</a> ";
                wpfp_remove_favorite_link($post_id);
                echo "</li>";
            }
        else:
            echo "<li>";
            echo $wpfp_options['favorites_empty'];
            echo "</li>";
        endif;
        echo "</ul>";
        wpfp_clear_list_link();
        echo "</div>";
        wpfp_cookie_warning();
    ?>

    How do I place i.e. <?php the_content(); ?> and custom field keys to output the content of those?

    Thanks for your advise!

  2. oumun
    Member
    Posted 2 years ago #

    i need the same function.

    tried many times but failed.

    Plz help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic