Support » Plugin: WP Favorite Posts » Futured Image and few other suggestens

  • Few thing you may consider adding to improve your great plugin. 🙂

    1. Is it possible to add futured image to list of favorite posts?
    For sites that based on images this could be very handy option.

    2. Would be very good to have a link to “My Favorites” page instead of “Add” or “Remove”. I think there should be something like link to “My Favorite Posts” and add/remove next or under main link.

    3. Icons would be more helpful if shows in two instances – something like blank star/heart for default (not added posts) and green (or red, or any color) when post already added to favorites.

    Thanks!

    https://wordpress.org/plugins/wp-favorite-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
  • this is what i use for the thumbnails.
    just go to /wp-content/plugins/wp-favorite-posts/wpfp-page-template.php

    <?php
        $wpfp_before = "";
        echo "<div class='wpfp-span'>";
        if (!empty($user)) {
            if (wpfp_is_user_favlist_public($user)) {
                $wpfp_before = "$user's Favorite Posts.";
            } else {
                $wpfp_before = "$user's list is not public.";
            }
        }
    
        if ($wpfp_before):
            echo '<div class="wpfp-page-before">'.$wpfp_before.'</div>';
        endif;
    
        echo "<ul>";
        if ($favorite_post_ids) {
    		$favorite_post_ids = array_reverse($favorite_post_ids);
            $post_per_page = wpfp_get_option("post_per_page");
            $page = intval(get_query_var('paged'));
    
            $qry = array('post__in' => $favorite_post_ids, 'posts_per_page'=> $post_per_page, 'orderby' => 'post__in', 'paged' => $page);
            // custom post type support can easily be added with a line of code like below.
            // $qry['post_type'] = array('post','page');
            query_posts($qry);
    
            while ( have_posts() ) : the_post();
                echo "
    
    <div style='
    width:190px;
    border:0px gray solid;
    margin:7px;
    padding:5px;
    float:left;
    '>
    
    <div style='
    width:180px;
    height:180px;
    border:1px gray solid;
    padding:4px;
    float:left;
    overflow: hidden;
    '>
    " . get_the_post_thumbnail( $user_fav, array(300,180) ) . "
    </div>
    
    <div style='
    width:180px;
    height:20px;
    margin-left:auto;
    margin-right:auto;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    '>
    
    ";
                wpfp_remove_favorite_link(get_the_ID());
                echo "
    
    <a href='".get_permalink()."' title='". get_the_title() ."'>" . get_the_title() . "</a> 
    
    </div>
    
    </div>
    
    ";
            endwhile;
    
            echo '
    <div style="float: left;width:100%;">
    
    <div class="navigation">';
                if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
                <div class="alignleft"><?php next_posts_link( __( '&larr; Previous Entries', 'buddypress' ) ) ?></div>
                <div class="alignright"><?php previous_posts_link( __( 'Next Entries &rarr;', 'buddypress' ) ) ?></div>
    
    </div>
                <?php }
            echo '</div>';
    
            wp_reset_query();
        } else {
            $wpfp_options = wpfp_get_options();
            echo "<div style='float: left;width:100%;'>";
            echo $wpfp_options['favorites_empty'];
            echo "</div>";
        }
        echo "<div style='float: left;width:100%;'>";
    
        echo "'".wpfp_clear_list_link()."'</div>";
        echo "</div>";
        wpfp_cookie_warning();

    Thank you Metal_13, I’ll try it. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Futured Image and few other suggestens’ is closed to new replies.