Quantcast
Channel: Exclude only first post from one category from the latest posts feed, wordpress - Stack Overflow
Browsing all 7 articles
Browse latest View live

Answer by Super Model for Exclude only first post from one category from the...

Exclude first one From latest five posts <?php // the query $the_query = new WP_Query( array( 'category_name' => 'Past_Category_Name', 'posts_per_page' => 5, 'offset' => 1 )); ?>

View Article



Answer by Said Erraoudy for Exclude only first post from one category from...

here is a function that does just that: function get_lastest_post_of_category($cat){ $args = array( 'posts_per_page' => 1, 'order'=> 'DESC', 'orderby' => 'date', 'category__in' =>...

View Article

Answer by Sumith Harshan for Exclude only first post from one category from...

Method - 1 $cat_posts = new WP_Query('posts_per_page=1&cat=2'); //first 1 posts while($cat_posts->have_posts()) { $cat_posts->the_post(); $do_not_duplicate[] = $post->ID; } //Then check...

View Article

Answer by Bhumi Shah for Exclude only first post from one category from the...

for that you can use query_posts('offset=1'); for more info : blog

View Article

Answer by Duncan Lock for Exclude only first post from one category from the...

You would need to update the template's logic so that the main loop skips outputting the post that's output at the top. Without seeing your template code, it's hard to be specific, but something like...

View Article


Answer by seoul for Exclude only first post from one category from the latest...

Initiate a variable and check inside your loop. A simple way: $i=0; while(have_posts() == true) { ++$i; if($i==1) //first post continue; // Rest of the code }

View Article

Exclude only first post from one category from the latest posts feed, wordpress

I administrate a website(www.teknologia.no) running Wordpress. As you can see on the front page I have a "main/featured" article on the top of the page showing the latest post from a specific...

View Article
Browsing all 7 articles
Browse latest View live




Latest Images