DIsplaying 2 featured posts then 3 excerpts with pagination
-
Hi,
I am new to wordpress, if anyone could help me it would be hugely appreciated. Here is my problem:
I have query posts on a Page. What it currently does it get 2 post and displays there content it then gets 3 post offset by 2 and displays the excerpt. When I go to the older posts Page 2 the page displays the same layout as the Page 1. What I would like to happen is that any older posts only display the excerpts, so when you are on page 2 -> 5 posts are displayed using the excerpt only. Similar to this website: https://www.thinkfa.com/exposure/ .
Here is my code:
[Code moderated as per the Forum Rules. Please use the pastebin]Using this function:
<?php function my_post_limit($limit) { global $paged, $myOffset; if (empty($paged)) { $paged = 1; } $postperpage = 3; $pgstrt = ((intval($paged) -1) * $postperpage)+$myOffset . ', '; $limit = 'LIMIT '.$pgstrt.$postperpage; return $limit; } //end function post_limit ?>
Any help would be awesome.
- The topic ‘DIsplaying 2 featured posts then 3 excerpts with pagination’ is closed to new replies.