To customise the Genesis loop on the blog page only, the blog page can be conditionally selected, the loop removed on that page only and a custom loop inserted.
The blog page is selected with is_home, the genesis_do_loop is removed and a new loop wpb_change_home_loop is inserted.
The core markup for the genesis_do_loop is found in the framework at /lib/structure/loops.php line 75 genesis_standard_loop, so here you can adjust what is needed to output.
In the example above the excerpt is removed genesis_entry_content, but re-added with the_excerpt_max_charlength which refers to a separate function below the loop function to alter the character count of the excerpt – set to 200 in the example, also since the featured image is removed by genesis_entry_content this is also added back in with genesis_do_post_image.
5 comments
Mansoorkhan TK
Thank you.
Paul Lacey
Thanks man… This is the explanation that has really helped me. Now almost anything seems possible.
This is a great tutorial for replacing basically any core Genesis function too.
Cheers
Neil Gowran
No worries, yes you can then basically custom code any loop you need.
Emman The GreaT
Thanks, it helps me alot…
Duy nguyen
Thank you! this is a very helpful article for me.