• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Am I correct to assume the following as a Genesis newbie

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Am I correct to assume the following as a Genesis newbie

This topic is: not resolved
  • This topic has 1 reply, 2 voices, and was last updated 10 years, 3 months ago by Marcy.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • February 21, 2016 at 4:46 pm #179575
    davejacobs
    Member

    Hi, there I'm new to Genesis, and after playing around with it, would I be correct to assume the following:
    1. One can drop code into any hook area with a function in Genesis, for example:

    add_action('genesis_before_loop', 'author_data');
    function author_data()
    { // code dropped in }

    2. When one replaces the genesis loop with a custom loop, one doesn't need to check if there are posts or not (with if statement), like one would usually do with WP templates, for example: (just make sure genesis() runs at the end)

    function my_custom_loop() {
    $args = array('author_name' => 'themedemos', 'posts_per_page' => 3);

    $my_posts = new WP_Query($args);
    while ($my_posts->have_posts()) : $my_posts->the_post();
    ?><h2>"><?php the_title(); ?></h2><br
    /><?php the_excerpt(); ?><br/>
    <?php
    endwhile;
    // Reset Post Data
    wp_reset_postdata();
    }

    remove_action('genesis_loop', 'genesis_do_loop');
    add_action('genesis_loop', 'my_custom_loop');

    February 22, 2016 at 12:58 pm #179628
    Marcy
    Participant

    Yes, you're correct in your understanding of both questions.

    There are plugins to help you see the hooks; you can turn them on or off:
    Genesis Visual Hook Guide

    Genesis Visual Hook Guide

    or Simply Show Hooks

    Simply Show Hooks

    There is also a hook reference in the Docs section of my.studiopress.com


    Marcy | Amethyst Website Design | Twitter

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble