Plugin Directory

Changeset 656876


Ignore:
Timestamp:
01/22/2013 01:42:54 PM (13 years ago)
Author:
ssovit
Message:
  • updated readme.txt
Location:
featured-post
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • featured-post/tags/2.0.1/readme.txt

    r656856 r656876  
    5858As mentioned earlier, this is just a simple featured posts management plugin that adds the post meta data as featured=yes for the particular post marked as featured.
    5959
     60= Does This Support Custom Post Type? =
     61Yes, it does. To display featured post of any Custom Post Type pass the arguement `post_type=YOUR_POST_TYPE` along with `featured=yes`. For example, if I have custom post type "portfolio" and I want to show featured posts in post type "portfolio' (so called featured portfolio), then I would do, `query_posts('post_type=portfolio&featured=yes')` before the `have_posts()` loop.
     62
     63= Does it work with WP_Query() class? =
     64Yes, absolutely, it does. you can pass it as string type arguement like `$query=new WP_Query('post_type=portfolio&featured=yes&posts_per_page=1')` or even in array type arguement like `$query=new WP_Query(array('post_type'=>'portfolio','featured'=>'yes'));` then use how the regular WP_Query is used.
     65
     66= How Does it work exactly? =
     67This plugin actually hooks over `pre_get_posts` filter and make the WP_Query class to only fetch posts/entries which are marked featured whenever featured=yes query var is passed as query arguement(Hope that makes sense).
    6068
    6169
  • featured-post/trunk/readme.txt

    r656856 r656876  
    5858As mentioned earlier, this is just a simple featured posts management plugin that adds the post meta data as featured=yes for the particular post marked as featured.
    5959
     60= Does This Support Custom Post Type? =
     61Yes, it does. To display featured post of any Custom Post Type pass the arguement `post_type=YOUR_POST_TYPE` along with `featured=yes`. For example, if I have custom post type "portfolio" and I want to show featured posts in post type "portfolio' (so called featured portfolio), then I would do, `query_posts('post_type=portfolio&featured=yes')` before the `have_posts()` loop.
     62
     63= Does it work with WP_Query() class? =
     64Yes, absolutely, it does. you can pass it as string type arguement like `$query=new WP_Query('post_type=portfolio&featured=yes&posts_per_page=1')` or even in array type arguement like `$query=new WP_Query(array('post_type'=>'portfolio','featured'=>'yes'));` then use how the regular WP_Query is used.
     65
     66= How Does it work exactly? =
     67This plugin actually hooks over `pre_get_posts` filter and make the WP_Query class to only fetch posts/entries which are marked featured whenever featured=yes query var is passed as query arguement(Hope that makes sense).
    6068
    6169
Note: See TracChangeset for help on using the changeset viewer.