• 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

Looking for Hook re: customizing post content on homepage (Education)

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 › Design Tips and Tricks › Looking for Hook re: customizing post content on homepage (Education)

This topic is: resolved

Tagged: education 2.0, home page

  • This topic has 7 replies, 2 voices, and was last updated 10 years, 8 months ago by daveburris.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • January 16, 2013 at 8:24 am #12273
    daveburris
    Member

    I'm looking for a hook to customize the home page in the Education Theme so that I can bring in a page in that spot instead of blog posts. I might be able to wing it, but I imagine this has popped up before. In the old Education Child Theme, the section was widgetized, but it doesn't appear to be so in the new, responsive version. Any help would be appreciated. Thanks.

    January 16, 2013 at 9:01 am #12287
    David Decker
    Member

    In Education 2.0 you have widgetized areas before the actual content, so in the upper part of the home page.

    The blog posts below are from the "real" home page. To make use of a regular page here just setup a new page, after that go to your WordPress settings under "Settings > Reading" and setup your static home page. This should really do it if I understand you correctly.


    Twitter @deckerweb // Google+ // My Genesis & WordPress Plugins // German Translations for Genesis

    January 16, 2013 at 10:06 am #12316
    daveburris
    Member

    Thanks for that. My understanding is that doing what you recommend will replace the entire home page. What I'd like to do is keep the homepage slider & homepage widgets and instead get a hook that pulls a designated page into just the content area. If you know of a hook that will accomplish that, I'd appreciate it.ย Thanks again for your help.

    January 16, 2013 at 10:20 am #12320
    David Decker
    Member

    Ok, thanks for your feedback, I now understand what's going on ๐Ÿ™‚

    The "issue" is that WordPress differentiates between the state "is_home()" (served via a file home.php) and "is_font_page()" when setting a regular page as the home page.

    I see two alternatives to get what you want:
    Using the packaged "home.php" and make it's regular content (in that case the "loop") widgetized so you could place in anything you want.

    Or you could re-add the stuff for the top area from the home.php to your functions.php and make a conditional statement to only do that for a page ID --- just for that page ID that you before set up as static homepage.

    Both should keep the "header / top" stuff intact.

    Personally I would go the "widget" way. But it's up to you. I could help with the code snippets if you want.


    Twitter @deckerweb // Google+ // My Genesis & WordPress Plugins // German Translations for Genesis

    January 16, 2013 at 10:23 am #12321
    daveburris
    Member

    Great. If I could widgetize the content loop, that'd be great. Is there a simple hook or snippet for that?

    January 16, 2013 at 1:05 pm #12367
    David Decker
    Member

    Great!

    Please make a backup of your functions.php and home.php first! (Always better to have ๐Ÿ™‚

    Then add these pieces of code to the files:

    The first part goes into the home.php file, at the bottom but BEFORE the closing "genesis();".

    The second part goes into the functions.php, also best at the bottom.

    For both, don't copy the beginning "< ?php" lines!!

    What it does: it first registers a new widget area in your functions.php, then in your home.php it removes the content loop, replaces with widget stuff, but only if the area has active widgets.

    I hope this helps. It could be that you have to make a few CSS minor fixes but just try if it works for you.

    -Dave ๐Ÿ™‚


    Twitter @deckerweb // Google+ // My Genesis & WordPress Plugins // German Translations for Genesis

    January 17, 2013 at 7:51 am #12610
    daveburris
    Member

    Thanks so much, David. That worked like a charm.

    January 26, 2013 at 7:20 am #14984
    daveburris
    Member

    David -- I've been using the #content to customize the CSS for that widget, but I'd like the widget to take on different properties than the rest of the content. Is there a different ID I should use that would customize just that homepage widget?

    Thanks.

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Design Tips and Tricks’ 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

© 2023 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