Genesis Before Loop Widget isn't Working?

Community Forums Forums Design Tips and Tricks Genesis Before Loop Widget isn't Working?

This topic is: resolved

This topic contains 4 replies, has 2 voices, and was last updated by  MM 2 years, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #44596



    I’ve added the Genesis Before Loop Widget. But the content doesn’t show up?

    Can anyone help troubleshoot? I’m trying to add 3 images (showing 3 blog categories) above the loop.

    Also, home.php was renamed home.txt to solve an issue. If changing to home.php, screen goes white.

    Any ideas?



    What code did you use for the widget?



    Hi Brad

    Your code which successfully registers the Widget in Appearance > Widgets, though nothing displaying before loop when testing.

    Would the home.php issue influence that? Otherwise, open to all ideas?




    I think its my bad Mike. Sincere apologies.

    Just tested it without any changes and it works for a custom blog page.

    You could try changing the name blog in the conditional tag to the page i.d for your blog.

    You can grab that from the source code or by hovering over the delete or edit button for your blog page.

    Otherwise, if using your home page as your blog page, change the conditional tag to is_home()

    so this line

    if ( is_page(‘blog’) && is_active_sidebar( ‘before-loop’ ) ) {


    if ( is_home() && is_active_sidebar( ‘before-loop’ ) ) {

    or this

    if ( is_front_page() && is_active_sidebar( ‘before-loop’ ) ) {

    If you want the widget to output full width, change the hook from:

    add_action( ‘genesis_before_loop’, ‘wpsites_before_loop_widget’, 5 );


    add_action( ‘genesis_before_content_sidebar_wrap’, ‘wpsites_before_loop_widget’, 5 );

    The code is actually written for a custom blog page which is why it didn’t work.



    Thanks Brad. Great instructions. ¬†And for any others reading…

    The only tweak I had to make was to delete the below code line

    echo ‘</div><!– end .before-loop –>';

    With that line present, the blog loop rolled into the sidebar.

    Without it, the normal home / blog sidebar should remain.



Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Genesis Before Loop Widget isn't Working?’ is closed to new replies.