Make carousel slider from last 5 posts product from related category with prev and next button
Make carousel slider from last 5 posts product from related category with prev and next button
Make carousel slider from last 5 posts product from related category with prev and next button
you can create custom featured image sizes in your theme’s functions file that can then be called in your theme’s template files. Read more add-custom-featured-image-sizes
Try to use wp_query instead of query_posts
It is possible, you will need to create another loop for that special category using WP_Query class. An example of a loop returning the “cats” category would be: // WP_Query arguments $args = array ( ‘category_name’ => ‘cats’, ); // The Query $query = new WP_Query( $args ); // The Loop if ( $query->have_posts() ) … Read more
You could add time params to your WP_Query. Posts that have the same tag and were published during the current week: <?php $recent = new WP_Query(‘post_type=stories&story_tag=featured&posts_per_page=4&year=”.date(“Y’).’&w=’.date(‘W’); ?> Source: the codex and me since i recently did this.
As you’re trying to get the ID of an attachment, functions like get_post_thumbnail_id() won’t work on an attachment post because itself is the attachment. You should be able to get the ID simply with $post_id = $attachment->ID;
WordPress : how to allow a user to post a module that leads any visitor to a product page ? (front end)
if($count == 1 && !is_paged() ) : http://codex.wordpress.org/Function_Reference/is_paged
You can use get_the_post_thumbnail() and pass the ID of the parent instead: if ( $post->post_parent ) $post_id = $post->post_parent; else $post_id = $post->ID; if ( $thumbnail = get_the_post_thumbnail( $post_id, ‘post-thumbnail’ ) ) { echo $thumbnail; }
Recommending a plugin is not how it works in this community, but there is a plugin which is lightweight and does exactly what you need. Check the plugin in WP Remote Thumbnail