This is a post skewed towards the Genesis Framework. Actually, if you’re not using the Genesis Metro Pro theme, I don’t know how well this will work.
My problem was simple. I used the Metro Pro Static Front Page to show some widgets and then custom displays of posts via those widgets. It works pretty darn well and looks like this:
There was just one small issue. It doesn’t show me pagination at the bottom of the page. Oh and the normal method of example.com/page/2/
just showed me the same front page over and over. Not what I wanted.
One way I could work around this would be to treat the front page as a static front page and make a “blog” page. Except then my urls would be example.com/blog/page/2
and I’d have duplicate content on example.com/blog/
which is not desirable. Causing me more frustration was the fact that the documentation said this:
If no widgets are placed in any of the home page specific widget areas, a blog-style home page will be displayed.
What I wanted was that blog-style page on the sub pages, along with navigation.
Show Navigation Links
This part was easy. In the file front-page.php
I edited the function function metro_homepage_widgets()
to have this at the bottom:
genesis_posts_nav();
Really, that was it. Now I had navigation! But (as I already knew) the navigation didn’t work properly.
Fix Paged Content
At the top of the front-page.php
file is a call to add an action with all the metro_home_genesis_meta
content. I wrapped that in a check to see if the page we’re on is a ‘paged’ page using is_paged()
, which specifically checks if the query is for paged result and not for the first page.
if ( !is_paged() ) { add_action( 'genesis_meta', 'metro_home_genesis_meta' ); }
Again, really, that was it.
Comments
One response to “Pagination and Static Front Pages”
Do keep in mind the ‘posts_per_page’
If the number of the homeopaten is different the second page will have a different offset