Articles of featured post

Get the 5 lastest Featured Posts from a category

Here is the website http://ariadneswonderland.gr/ that all this concerns. On the homepage I’m using a Drop shadow box plugin under the gallery to show a series of images of featured posts, as of right now, as i’m still building the website all you see is the White box under the gallery and a emoticon inside […]

“Issues” loading MANY featured images on a single page (custom template)

I have a page that loads a lot of featured items in a grid. There are up to 56 images loading, and it does have a bit of a delay. This is the code as it runs now: if( count( $postslist ) > 0 ) { foreach ($postslist as $post) : setup_postdata($post); ?> <div class=’oneCell’> […]

Adding a 'featured' class to certain posts

I would like users of my theme to be able to mark some posts as more important so that my theme can draw more attention to them. I’m not sure about the best way to go about this? Is it possible to add a default category of ‘featured’ to a theme that will be there […]

How to change featured content to a different tag in WordPress Twenty Fourteen?

In twenty fourteen theme, we’d like to know how to change the features content tag. Currently it’s set as featured. Now, we would like to know how to code this for different page templates. We notice in page.php there is a piece of code calling the template part featured-content. <?php if ( is_front_page() && twentyfourteen_has_featured_posts() […]

Get the size (size in Kb or MB) of an featured image?

I need to display some featured image info on post page. Among other info I need to display file size of image (featured image of post). I tried this function inside single.php. <?php function getSize($file){ $bytes = filesize($file); $s = array(‘b’, ‘Kb’, ‘Mb’, ‘Gb’); $e = floor(log($bytes)/log(1024)); return sprintf(‘%.2f ‘.$s[$e], ($bytes/pow(1024, floor($e)))); } ?> and […]

Include a specific post to the query_posts and remove it if it is already in the returned list

Bare with me. Firstly, here is my whole script for my featured slider articles: <div id=”featured” class=”<?php if ( $responsive ) echo ‘flexslider’ . $featured_auto_class; else echo ‘et_cycle’; ?>”> <a id=”left-arrow” href=”#”><?php esc_html_e(‘Previous’,’Aggregate’); ?></a> <a id=”right-arrow” href=”#”><?php esc_html_e(‘Next’,’Aggregate’); ?></a> <?php if ( $responsive ) { ?> <ul class=”slides”> <?php } else { ?> <div id=”slides”> […]

How to set the width and height rule for featured image

I want to know how to make rules to re-size the images for featured image? I am uploading an image in featured image section but it is not cropping the images in exact width and height for all the images. I need (width:100 X height:140). So how to do that? Any help and suggestions are […]

Find posts without featured image?

This question already has an answer here: Check for featured image in WP_Query 3 answers

Display featured products through custom loop in WooCommerce 3

I was wondering if someone could help me. I am trying to display featured products using a custom loop. Before WooCommerce 3 I used following loop, which worked perfectly: <?php $args = [ ‘post_type’ => ‘product’, ‘meta_key’ => ‘_featured’, ‘meta_value’ => ‘yes’, ‘posts_per_page’ => 6 ]; $featured_query = new WP_Query( $args ); if ($featured_query->have_posts()) : […]

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.