I have this code that is not working as expected. No First or last or prev links will display...

                            <!-- post pagination -->
                            <nav class="post-pagination">
                                <ul class="pagination">
                                    <li class="pagination-first"><a href="{pagination_url}" rel="first"> First </a></li>
                                <li class="pagination-prev"><a href="{pagination_url}" rel="prev"> « </a></li>
                                <li class="pagination-num {if current_page}current{/if}"><a href="{pagination_url}"> {pagination_page_number} </a></li>
                                <li class="pagination-next"><a href="{pagination_url}" rel="next"> » </a></li>
                                <li class="pagination-last"><a href="{pagination_url}" rel="last"> Last </a></li>
                        <!-- post pagination -->

I get this on the front end ... see attached. Any help would be appreciated.

enter image description here

2 Answers 2


First and last links in pagination appear only when there are at least 4 pages of entries. It's not in the main documentation but it's included in the user-contributed notes in the docs.

  • Still a little confused by this as I would like it if the first and last / prev and next links showed all the time. I thought they would by default and you would use the if statements to determine if they show. Any advice on this would be appreciated. Apr 1, 2013 at 16:52
  • As Bhashkar indicated, try changing your limit parameter on your entries loop to something quite low to test for sure. The reason it doesn't show when there are fewer pages is to avoid duplication. On a pagination set with only two pages, for example, next page and last page would be links to the same page. Apr 1, 2013 at 18:09

ExpressionEngine usually shows 3 pages. If there are more page than 3, then it will display "First" and "last". In your case, it seems there is only 2 pages.

You can check it by decreasing the limit value.

  • Many thanks. Shame it is not in the documentation. Apr 1, 2013 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.