I am using a Wordpress plugin (WP Favorite Posts). The problem I am having is that by default the plugin simply lists the users favorite posts as plain text in a UL menu. I want to style it the same way that I do on my main page. Can someone please help me rewrite this code to match the format that follows.
Default code:
PHP Code:
<?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();
?>
Intended outcome
Code:
<div class="post-box">
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'portfoliopress' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark" style="font-family:Arial;font-size:12px;font-weight:bold;"><?php echo ShortenText(get_the_title()); ?>
<BR />
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'portfoliopress' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
<div style="height:116px;overflow:hidden"><img src="<?php echo get_post_meta($post->ID, 'custom_field_1', true); ?>" /></div></a>
</div>
Bookmarks