daebat Posted April 4, 2011 Share Posted April 4, 2011 I'm just installed Yet Another Featured Posts Plugin and it is working just fine but only outputting the title and text for my post. I have a featured image and it claims to have the functionality to do so but I can't figure out the call to the data. Here is what is provided in the documentation: http://dev.jonraasch.com/yafpp/docs For advanced users, YAFPP offers some useful output options which can be passed to the get_featured_posts() function like so: <?php get_featured_posts(array( 'method' => 'return')); ?> In this example we are setting YAFPP to return the formatted list of featured posts, as opposed to echoing it out like it does by default. Additionally you can pass 'arr' to get YAFPP to return an array of data for the featured posts. The format for this array is a list of the posts, each of which contain these keys: <?php array( 'id' => '', // id of the post 'title' => '', // title of the post 'excerpt' => '', // excerpt of the post 'url' => '', // the post permalink 'image' => '', // an array of data for a YAPB image, if it exists 'author' => '', // the post's author ); ?> Currently my code is very simple like this: <?php get_featured_posts(); ?> Thanks for the help! Quote Link to comment https://forums.phpfreaks.com/topic/232678-simple-array-question/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.