• 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

Using genesis_before_entry hook on Education Pro homepage

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 › Using genesis_before_entry hook on Education Pro homepage

This topic is: not resolved

Tagged: education pro, genesis_before_entry, hook

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 11 months ago by emasai.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • October 7, 2014 at 12:36 pm #127008
    braderz31
    Member

    Hi Guys

    On the Education Pro theme, the homepage has a list of posts.

    I've added a hook to add a custom DIV container just before the posts begin. This works fine but for some reason, this container also appears on my blog index page and also singular posts.

    I have tried using is_home() but this didn't work either.

    add_action ( 'genesis_before_entry', 'add_latest_news_title' );
    function add_latest_news_title() {
        if ( !is_page('home') ) {
        echo ' <div class="newstitle-container"><h1>Latest News</h1></div>';
        }
    }

    Any idea what I'm doing wrong?

    Many thanks

    Brad

    October 7, 2014 at 1:25 pm #127013
    emasai
    Participant

    The home page of Education Pro uses a template called front-page.php. Try changing to

    if ( is_front_page() ) {


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

    October 7, 2014 at 2:43 pm #127021
    braderz31
    Member

    Hey- Thanks for responding.

    I've just tried it and I get the same.

    The container is appearing on the homepage and the blog page.

    Any more thoughts?

    🙂

    October 7, 2014 at 3:09 pm #127023
    emasai
    Participant

    My only other suggestion would be this, front page being the home page and home being the blog page.

    if ( is_front_page() && !is_home () ) {


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 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

© 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