I did this by editing the plugin file: wpfp-page-template.php
Search for the line
while ( have_posts() ) : the_post();
Then add WordPress functions like:
the_content();
the_post_thumbnail();
Thanks Simon, I appreciate that 🙂
Cool 🙂 I think this plugin is a great starting point for various things.
Agreed, I’m actually using it as a way to add multiple posts to an archive, which can then be output as a single PDF file. So far so good.
How to view all favorites post, after login ?
From wer i can find the view all favorites link ?
Hi guys,
Im still struggling with this as you can see i just went ahead before giving up and replacing everything in sight with the_content.
Not quite sure how to get the content to show. Help would be appricited.
while ( have_posts() ) : the_content();
echo "<li><a href='".the_content()."' title='". get_the_content() ."'>" . get_the_content() ."</a> ";
wpfp_remove_favorite_link(get_the_ID());
echo "</li>";
endwhile;
Need to change line in wp-favorite-posts-extended/wpfp-your-favs-widget.php for Extended i think. This works for me fine:)
‘
echo “post_title .”‘>” . $p->post_title . $p->post_content . “ “;
‘
Per what Simon said above, I see what you’re talking about and where to change it. I’ve created a page template to get my favorites to display and want to show various things, thumbnail, custom fields, etc. … what do I put in the page template to call the favorites/changes to the wpfp-page-template.php?
In my test case I think it was literally replacing the section:
while ( have_posts() ) : the_post();
echo "<li><a href='".get_permalink()."' title='". get_the_title() ."'>" . get_the_title() . "</a> ";
wpfp_remove_favorite_link(get_the_ID());
echo "</li>";
endwhile;
with:
while ( have_posts() ) : the_post();
echo "<li><a href='".get_permalink()."' title='". get_the_title() ."'>" . get_the_title() . "</a> ";
the_content();
the_post_thumbnail();
wpfp_remove_favorite_link(get_the_ID());
echo "</li>";
endwhile;
My client no longer has need for this functionality so I deleted the test site (and plugin), which means I can’t offer much help beyond that.
I get what you’re saying on the plugin edit, but I’ve made a page template to list the favorites. I was looking for the code that replaces the loop. I’ve found that, finally …
<?php $my_query = new WP_Query('post_type=any&meta_key=wpfp_favorites'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
However, it will show both favorited and unfavorited posts … someone said it had something to do with the meta_value and that I should add an argument to my query …
<?php
$args = array( 'post_type' => 'post', 'meta_key' => 'wpfp_favorites', 'meta_value' => 1 );
$my_query = new WP_Query( $args); ?>
Now if I could make these two work together, I might solve my problem, but I guess I don’t understand how to use all of this code as one snippet. Perhaps you could help me make one snippet out of it so it’ll work … LOL. I appreciate your feedback!