Support » Plugin: WP Favorite Posts » Show Favorites page in grid??

Viewing 9 replies - 16 through 24 (of 24 total)
  • @ksaffy: dis is the link (i.e- using pinboard theme)

    http://demo.onedesigns.com/pinboard/

    If you add the above code pasted code and add the ul css for favorite_thumbnails (this is required for the thumbnail layout), it should work for you as a grid style layout (3 or 4 column grid).

    CSS:

    #favorite_thumbnails{list-style-type:none;list-style-position:inside;padding:0;margin:0}
    #favorite_thumbnails li{float:left;margin:0;padding-left:7px;padding-right:7px;padding-top:2px;padding-bottom: 2px;display:block;opacity:1}
    #favorite_thumbnails li a{border:0 none;line-height:normal;font-size-adjust:none;font-stretch:normal;clear:right}
    #favorite_thumbnails li a+a{position:relative;top:-50px;display:block;padding-left:10px;padding-top:5px;padding-bottom:0;padding-right:0;margin-left:0;width:auto;height:auto;background:#000!important;overflow:hidden;height:40px;color:#FFF!important;text-decoration:none;font:12px Arial;text-transform:uppercase;font-weight:800;opacity:.8}
    #favorite_thumbnails img{padding:2px;margin:0;border:0 none}
    #favorite_thumbnails img:hover{opacity:.3;transition:opacity .5s linear}

    The only thing you may need to alter on the above pasted code is the call for the thumbnail. I use:

    echo get_the_post_thumbnail ( $post_id, '270x150');

    which pulls the thumbnail of the featured image that I use in my theme called ‘270×150’. Your own theme will definitely not use the same, so you’ll need to define it. It’s most likely ‘thumbnail’. In which case you’d use:

    echo get_the_post_thumbnail ( $post_id, 'thumbnail');

    @ksaffy : Actually i’m not using “WP Favorite Posts” plugin…I’m using “Wp Posts Playlist” plugin and almost i customized what i need but it’s not so good and i can’t able to make infinite scroll (i.e load more options), also i can’t able to keep delete (remove post) option.
    Now i’m going to use “Wp Posts Playlist” plugin in my proj.(which was used by you) but it is possible to make infinite scroll and masonry effect in your code?

    You can pull off the masonry effect with css and jquery (call to the list), so just adjust your css and add some jquery in your page header. The grid list code above should scroll infinitely as there’s no pagination defined.

    This link should help:

    http://wp.tutsplus.com/tutorials/theme-development/using-jquery-masonry-for-pinterest-like-posting/

    @ksaffy how did you get the heart to change colors when clicked? There’s a related post here in the forums but its incomplete. any help is appreciated.

    i got it. I just used icons (html) in the “Text for add link” and “Text for remove link” fields and it works perfectly. like

    <i class="icon-remove"></i>. helps that Im using bootstrap. (strappress

    There’s various options. I just created div elements for add link and remove link and set the images with css. Glad you got it to work for you 🙂

    Hi @ksaffy. Thank you so much. I’m so close to fixing this plugin because of you. I thought I’d add the full code that worked with all the event info taken out. The css really helped too. Thank you.

    <?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>";
        echo "<div class='box'>";
       if ( is_user_logged_in() ) {
       global $current_user;
          get_currentuserinfo();
          echo '<h5 class="sub">Welcome ' . $current_user->display_name . "!</h5> ";
    } else {
        echo '<h5 class="sub">Welcome, visitor</h5>';
    }
        echo "Enter your sentence here and change the icon url. Just click <img src='http://www.example.com/heart.png' alt='favourite gigs' width='11'> my favorites 'Add to My Faves' on the shopping page of any product you want to save.<br><br><br><br>";
     echo "</div>";
    
         if ($favorite_post_ids):
         $favorite_post_ids = array_reverse($favorite_post_ids);
    
            foreach ($favorite_post_ids as $post_id) {
                $p = get_post($post_id);
                $l = get_permalink($post_id);  
    
                echo "<ul id='favorite_thumbnails'><li>";
    
    echo "<a href='".get_permalink($post_id)."'>";
    echo get_the_post_thumbnail ( $post_id, 'thumbnail');
    echo "<br>";
    echo "<span><a href='".get_permalink($post_id)."' title='". $p->post_title ."'>" . $p->post_title . "</a></span>";
    echo "<br>";
    wpfp_remove_favorite_link($post_id);
    
                     echo "</li></ul>";
                    echo "</a>";
            }
        else:
       endif;
        echo "";
    echo "<br class='clear'>";
            echo "<br>";
    		echo "<br>";
    				echo "<br>";
        wpfp_clear_list_link();
            echo "<br>";
    		echo "<br>";
            echo "<br>";
    echo "</div>";
        wpfp_cookie_warning();
    ?>

    Also don’t foreget like I did to still create a new page.php template and add this

    <?php
     /*
     Template Name: myfavoritesII
     */
     ?>
    
     <?php get_header(); ?>
    
    <div class="container_12">
    
        <div class="grid_12">
    
    		<?php wpfp_list_favorite_posts();?>
    
    	</div>
    
    </div>
    
    <?php get_footer(); ?>

    Copy exactly your templates page and insert it instead of the loop and posts php.

    i followed the above and i get it almost to work.

    i have 2 questions:

    http://inspiration2you.com/?portfolio=portfolio-big
    (its “loading” somtething after the heart and before the text: Add to favorite
    What is it loading? And how can i remove that

    AND

    http://inspiration2you.com/?page_id=1451

    i can not get it to be grid (5 colums) – and i can not put coloured background on the page – do you know how?

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Show Favorites page in grid??’ is closed to new replies.