WordPress.org

Ready to get started?Download WordPress

Forums

WP Favorite Posts
Is it possible to display the value of a custom field? (1 post)

  1. ismania
    Member
    Posted 1 year ago #

    Is it possible to display the value of a custom field?
    I have modified the following template, but can not be displayed.
    - wpfp-page-template.php

    echo "<div class='wpfp-span-list'>";
        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 class='clearfix'>";
        if ($favorite_post_ids):
    		$favorite_post_ids = array_reverse($favorite_post_ids);
            foreach ($favorite_post_ids as $post_id) {
                $p = get_post($post_id);
    
                echo "<li>";
                echo "<div><a href='".get_permalink($post_id)."' title='". $p->post_title ."'>" . $p->post_title . "</a></div> ";
                echo "<div><a href='".get_permalink($post_id)."' title='". $p->post_title ."'>" . $p->post_content . "</a></div> ";
                echo "<div>" . $p->post_custom( 'food' ) . "</div> ";
                echo "<div class='wpfp-span-list-del'>";
                wpfp_remove_favorite_link($post_id);
    			echo "</div>";
                echo "</li>";
            }
        else:
            echo "<li style='border: none;'>";
            echo $wpfp_options['favorites_empty'];
            echo "</li>";
        endif;
        echo "</ul>";
        echo "<div>";
        wpfp_clear_list_link();
        echo "</div>";
        echo "</div>";
        wpfp_cookie_warning();

    Is there a solution to this problem?

    http://wordpress.org/extend/plugins/wp-favorite-posts/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic