• 0

Wordpress - Add Pagination to Homepage


Question

3 answers to this question

Recommended Posts

  • 0

You got <li> page elements linking to various pages, to get a homepage link you have to add a <li> element in front of the generated ones with the url that links to your homepage(you can use the wordpress php home url from the logo link).

Here's my code:


<ul id="menubar"><li class="<?php if (is_home()) { ?>current_page_item<?php } ?> page_item"><a href="<?php echo get_option('home'); ?>/">Home</a></li><?php wp_list_pages('title_li=' ); ?></ul>
[/CODE]

The <li> which is your current page had a class called "current_page_item" the other <li> elements have a class called "page_item".

Link to comment
Share on other sites

  • 0

sorry thats not my site..... I jus picked a generic name should of went with mydomain.com or yournamehere.com ..... but heres my site ( http://duddydesign.comyr.com/DemocracyConfusion/ ) i posted the output of $paged at the top.....

as you see the next page linked to http://duddydesign.comyr.com/DemocracyConfusion/page/2/ does not exist and returns a 404-not found.

Link to comment
Share on other sites

This topic is now closed to further replies.