Genesis Custom Loop Not Paginating Correctly On front-page.php

I recently had to debug why genesis_custom_loop wasn’t working on a homepage. The pagination at the bottom had “Next Page” but it only ever linked to page 2 even if the current “page” was 5. In the general settings, the homepage was set to a static page, not “The Latest Posts” page.

genesis_custom_loop uses genesis_posts_nav for the pagination and there’s no known way to update what the $page or $paged variable is to reference. Basically, static pages were never meant for pagination, so it won’t return the proper value unless you’re on a blog or archive page.

In order to fix this issue, writing a custom loop is necessary:

 

Let me know if you have any questions or suggestions. Or if you know of a magic way to make  genesis_custom_loop work on front-page.php I would be extremely happy to hear it.

Adding Apple Touch Icons to Genesis

For the basic favicon.ico, you can simply add this file to the /images directory in your child theme. But, it’s 2015 and there’s a ton of devices using different sizes for their icons it’s probably best to take advantage of those in the case someone saves the website to their home screen on their device.

I thought I’d take some time to research and create a new workflow to solve the problem of my lack of icon usage. Lately, I’ve been using Favic-o-matic to bulk generate ALL the icons instead of saving them out one-by-one. I also just spotted this one in the App Store.

Filter: genesis_pre_load_favicon

You can use the genesis_pre_load_favicon filter to add all the necessary needed icons. You can then place all the icons into the directory specified in $favicon_directory.

View the code on Gist.

 

Plugin

Personally, I like to keep plugins to a minimum but in the case you’re not a developer or you anticipate your client wanting to have control over this themselves, here’s a great plugin that has been kept up-to-date at the time of writing this.

Screen Shot 2015-12-09 at 9.26.27 PM

https://wordpress.org/plugins/favicon-by-realfavicongenerator/