{"id":54162,"date":"2017-02-06T11:34:27","date_gmt":"2017-02-06T11:34:27","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/tidyhive-featured-posts\/"},"modified":"2017-03-11T09:49:41","modified_gmt":"2017-03-11T09:49:41","slug":"tidyhive-featured-posts","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/tidyhive-featured-posts\/","author":15295040,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.5.0","stable_tag":"1.5.0","tested":"4.7.33","requires":"3.0.1","requires_php":"","requires_plugins":"","header_name":"Tidyhive Featured Posts","header_author":"Mohit Chawla","header_description":"","assets_banners_color":"636b74","last_updated":"2017-03-11 09:49:41","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/tidyhive.com","header_plugin_uri":"https:\/\/tidyhive.com","header_author_uri":"https:\/\/tidyhive.com","rating":0,"author_block_rating":0,"active_installs":60,"downloads":3901,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1592638","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.0.2","1.0.3","1.5.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[838,1087,86,166,162],"plugin_category":[43],"plugin_contributors":[131645,131646],"plugin_business_model":[],"class_list":["post-54162","plugin","type-plugin","status-publish","hentry","plugin_tags-featured","plugin_tags-featured-posts","plugin_tags-post","plugin_tags-posts","plugin_tags-widget","plugin_category-customization","plugin_contributors-orahmax","plugin_contributors-orahmax2","plugin_committers-orahmax2"],"banners":{"banner":"https:\/\/ps.w.org\/tidyhive-featured-posts\/assets\/banner-772x250.png?rev=1592638","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/tidyhive-featured-posts_636b74.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin adds the ability for the user to mark a post to be a featured post with just one click without the need of editing an individual post. The plugin also includes a widget which can display all the posts which have been marked featured.<\/p>\n\n<h4>Usage<\/h4>\n\n<ul>\n<li>Go to your admin dashboard page.<\/li>\n<li>Open all posts page which displays the list of posts in table.<\/li>\n<li>A column name 'Featured posts' will be there with a star icon in each row.<\/li>\n<li>Click the star to make that post as featured.<\/li>\n<\/ul>\n\n<p>Dashboard-&gt;Posts&gt;All Posts<\/p>\n\n<h4>Instructions<\/h4>\n\n<p>Q1. How to display feature posts?<\/p>\n\n<p>Plugin comes with a widget, which can be added to sidebar<\/p>\n\n<p>Q2. How to display featured posts in any desired section of theme(Developers)?<\/p>\n\n<p>In order to display featured posts in your theme, use the following code to fetch the posts.<\/p>\n\n<pre><code>$featured_posts = Thfp_public::thfp_get_featured_posts();\n<\/code><\/pre>\n\n<p>The above code return WP_Query object which you can use in a loop. Above static function accepts a parameter(int) which limits the number of posts which it can return.<\/p>\n\n<p>Show the posts with the help of custom loop:-<\/p>\n\n<pre><code>if($featured_posts-&gt;have_posts()):\n    while($featured_posts-&gt;have_posts()): $featured_posts-&gt;the_post();\n        \/\/Your code here\n    endwhile;\nendif;\n<\/code><\/pre>\n\n<p>You can also use your own wp_query. Make sure you use 'tag' key to be 'featured'.<\/p>\n\n<pre><code>$args = array(\n    'post_status'   =&gt;  'publish',\n    'tag'           =&gt;  'featured',\n    \/\/Use any other needed args\n);\n$featured_posts = new WP_Query($args);\n<\/code><\/pre>\n\n<p>and then use the loop to display posts.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>thfp.zip<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>","raw_excerpt":"Set featured posts with single click, no page refresh from admin panel.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/54162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=54162"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/orahmax2"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=54162"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=54162"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=54162"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=54162"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=54162"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=54162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}