Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to add pagination on Metro theme homepage that uses widgets
Tagged: homepage, Metro, pagination
- This topic has 20 replies, 9 voices, and was last updated 10 years, 1 month ago by hc2.
-
AuthorPosts
-
March 18, 2013 at 12:00 pm #29063schnitzelboyMember
I'd like to add pagination to the homepage of my Metro-themed homepage. I've tried the Genesis Featured Widget Amplified plugin/widget, but as you can see at my site (thesocialwhat.com) the pagination appears, yet doesn't work.
Any tips/ideas how I can make this work is most appreciated. Thanks!
March 18, 2013 at 12:13 pm #29070AngelaEloiseMemberThat is exactly what I've been trying to do!
Rather than using a plugin, I was advised to edit the home.php to include or move the post loop outside the widget area. I haven't been able to figure it out though; having syntax errors.
Do you know how to do that?
March 18, 2013 at 1:22 pm #29112schnitzelboyMemberNo I don't. I typically rely on widgets etc to make these types of changes...largely so I don't mess things up too much.
April 2, 2013 at 5:23 pm #32750BrianBMemberI'm also trying to work this out. I can't believe how difficult it is with a widgeted theme. So many sites use pagination so there has to be an answer.
@ AngelaEloise - How were you advised to edit the home.php file? If you can post up the instructions, I'll give it a go and see if I can get it to work.
May 1, 2013 at 1:22 am #38699ri001Memberany answer to how we can get pagination on our homepage somebody?
May 1, 2013 at 1:29 am #38701MarcoMemberYou cannot do it without an heavy modification on how the theme's home page works.
You've got to remove the home-bottom widget-area and place there a custom loop instance.
May 1, 2013 at 12:00 pm #38784ri001Memberis it safer or smarter to just make another category called "home" or something, and select all post. Then use the option "Show Category Archive Link" (here's an example I found... http://www.sliceofscifi.com/ )
May 1, 2013 at 12:48 pm #38797Brad DaltonParticipantYou could add the WordPress next and previous post/page tag in a custom function, Simple hooks plugin with conditional tag or paste it into your home.php file.
Using a custom function is the best method.
Change the conditional tag and hook position if needed.
Code not displaying? grab it on Github.
May 1, 2013 at 12:54 pm #38799Brad DaltonParticipantYou could also install the WP Page Navi plugin and use their code in the custom function.
May 5, 2013 at 4:44 pm #39459ri001Memberthe pagination has been added but its not working. How to use the same code on homepage as the code given is for single post page.
May 6, 2013 at 1:23 am #39488Brad DaltonParticipantChange the conditional tag in the code above from
is_single
to
is_home
May 6, 2013 at 6:48 pm #39637ri001MemberThanks for the quick reply. I'm still having issues. This code is showing a single older/previous post... not pagination.
May 7, 2013 at 8:58 am #39712ri001Memberanyone?
May 8, 2013 at 2:55 pm #39963ri001MemberAny support on supplying the code to add pagination on the homepage?
May 20, 2013 at 1:10 pm #41870pesunitesMemberHey Genesis community!
I currently have the same issue. Any solutions so far?
May 30, 2013 at 7:24 am #43182pesunitesMemberWould really appreciate your help!
May 30, 2013 at 8:11 am #43192pesunitesMemberI actually just figured out some work around, if you are interested please just respond to this topic and I'll explain
May 30, 2013 at 8:30 am #43195schnitzelboyMembersure - i'd be interested in learning about your workaround...
May 30, 2013 at 9:29 am #43207pesunitesMemberFirst, I want to say that I really am no expert in coding, I just figured this out somehow and IT WORKS but I am sure it's not the best way how to handle this problem.
So what I wanted to do with my blog is having the three-part "featured story" section on the homepage (just like here) and then a paginated list of my most recent posts.
I used the Genesis Featured Widget Amplified plug-in and put in in the home-bottom widget area. The number of posts to show needs to be 10 (or any other number you like) and you have to check the boxes "use pagination" and "show site/page navigation" (not sure how they call it in English because I use a German translation.
Make sure that your WordPress settings (Settings>Reading>Number of Posts) is set to 10 (or your desired number) as well!
The widget then is shown on the home page and the pagination should be displayed. You then may put your featured story widgets in the home-top/middle-left/middle-right areas and configure however you like.
Now, add this code to functions.php (not my code, found that somewhere)
Now, there should be a working pagination at the bottom of your front page. However, if you click on the second/third/... page, the featured stories are still shown. That bothered me, so I modified the home.php. Now, I my front page shows three featured stories and the 10 most recent articles. If I click on "next page", 10 more articles appear (11-20) but not the featured stories widgets.
To do this, open your home.php and search for the function metro_homepage_widgets() { part. Substitute it with this code.
Hope that helps
June 22, 2013 at 4:48 pm #47224statusmediaMemberWow! Can't believe how many people are looking for the same fix. Has anyone tried any of these solutions? Can you share a link where this has been implemented? I'm using Metro on here [http://blog.rivalhost.com/].
I'm going to experiment with some of these solutions, but honestly this seems like something that should be included with the theme. It doesn't make much sense to not have an easy way to show that there are more posts on the blog.
Any advice/examples/tips would be beneficial. I need a solution!
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.