How to get featured post title & image using JSON API?

Is there any possibility to get featured post title and image using the JSON API. I tried using this: example.com/?json=the_post_thumbnails&count=3 But instead of recent posts, I get featured posts. 2 Answers 2 I made a shortcut to my image by adding it directly to the API response. //Add in functions.php, this hook is for my … Read more

How to display Section for certain time

i am building a News site. I want to display 1 featured post from “prime” category for only few hours. after it should be expired or disappeared from the section. please have a look here u can see the post on top. <div id=”prime_news” class=”col-full”> <?php $the_query = new WP_Query(‘category_name=prime&showposts=1&orderby=post_date&order=desc’); if ($the_query->have_posts()) :?> <div id=”prime_headline”> … Read more

Is “Featured Content” in Twenty Fourteen done with a plugin, or is it native in WP4.0?

I found that Twenty Fourteen offers users to have Featured Content on there websites. That’s great, because I had written my own little script for such an occasion. But if the functionality is already there in WP, I might as well use that. However: When looking into Twenty Fourteen’s functions.php to investigate how it works, … Read more

Keep featured content post in homepage with original order

I’m searching how to keep the featured post in my blog homepage without excluding it from query post. My blog uses the Twenty Fourteen theme. I found this solution. Open the featured-content.php from your theme’s inc folder, and look for the following code (line 269 in our case). $query->set( ‘post__not_in’, $featured ); Simply comment out … Read more

Display featured products through custom loop in woocommerce on template page

I would like to display 6 featured products from my woocommerce store on my home-page.php template. After some researched I found that the right way to do this was through a custom loop,( I do not wish to use shortcodes because I would like to add additional classes for styling etc. ) I also found … Read more