Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter misterdude

    (@misterdude)

    Hi Hector,

    I patched up the bug and got it to work just fine. I had to empty out the cache in order for this to work but that wasn’t an issue as this is a new site/blog. I imagine this might be an issue if you are running an established site and needed to add custom fields to WPP.

    The “missing arguments” warning, an error on my side. I used the wrong code in header.php

    Thank you for all the support. you’re awesome, Hector!

    Thread Starter misterdude

    (@misterdude)

    Let me revise my previous post.

    What is the correct PHP code to place in the header.php and sidebar.php in order to make these two functions work?

    function my_trending_post( $post_html, $p, $instance ){
    
        $output = '<li><a href="' . get_the_permalink( $p->id ) . '">' . get_post_meta( $p->id, 'Trending', true ) . '</a></li>';
    
        return $output;
    
    }
    add_filter( 'wpp_post', 'my_trending_post', 10, 3 );
    function my_custom_sidebar( $post_html, $p, $instance ){
    
        $output = '<div class="holder"><a href="' . get_the_permalink( $p->id ) . '">' . $p->thumb_img . '</a><p><a href="' . get_the_permalink( $p->id ) . '">' . $p->title . '</a></p><span>' . $p->category . '</span></div>';
    
        return $output;
    
    }
    add_filter( 'wpp_post', 'my_custom_sidebar', 10, 3 );

    The code below works but only if it’s one WPP on the site…

    if ( function_exists('wpp_get_mostpopular') )
        wpp_get_mostpopular('order_by=views&limit=5&range=monthly');

    Thread Starter misterdude

    (@misterdude)

    Excellent, Hector! 🙂

    I’m currently trying to use this code to output 5 custom field values (in header.php) that are linking to the post.

    But what if I’m already using WPP on a sidebar widget? I noticed this effects that sidebar widget and also gives me missing arguments warnings.

    http://frightfeed.com/blair-witch-sequel-set-for-september

    Thank you for the assistance. Highly appreciate it!

    Thread Starter misterdude

    (@misterdude)

    Hi Hector,

    Thanks for the reply. Really appreciate it. Do you have an example?

    Or perhaps i can hire you to write it up if you’re currently available.

    Thread Starter misterdude

    (@misterdude)

    Thanks, Hector!

    Great plugin 🙂

Viewing 5 replies - 1 through 5 (of 5 total)