WordPress.org

Ready to get started?Download WordPress

Forums

WP Favorite Posts
Adding the list of favorite after text (2 posts)

  1. newbie2012
    Member
    Posted 2 years ago #

    Hello,

    I know there's been some discussion about positioning the list of users favorite posts.

    I've tried the solutions in the post but I can't seem to get the list to appear after text that I have written even though {{wp-favorite-posts}} is after it.

    Anyone got it to work yet on their site?

    Thank you.

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

  2. Krokodyl
    Member
    Posted 1 year ago #

    It's been a while since your post but I found a solution.

    In the file wp_favorite_posts.php find the function

    function wpfp_shortcode_func() {
        wpfp_list_favorite_posts();
    }
    add_shortcode('wp-favorite-posts', 'wpfp_shortcode_func');

    starting on line 297 and change it to

    function wpfp_shortcode_func() {
        ob_start();
        wpfp_list_favorite_posts();
        return ob_get_clean();
    }
    add_shortcode('wp-favorite-posts', 'wpfp_shortcode_func');

    I think it would be useful to incorporate this or similar (better?) solution in the core.

    [Please post code or markup snippets between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic