• 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

Identifying BLOG page

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 › Identifying BLOG page

This topic is: not resolved

Tagged: conditional tags, is_page_template( 'page_blog.php' )

  • This topic has 5 replies, 2 voices, and was last updated 10 years, 4 months ago by Brad Dalton.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • July 12, 2016 at 11:34 pm #189375
    siamnaulak
    Participant

    Hi,

    I need help in hiding widget area in Blog page 🙂

    I had created widget area at 'genesis_before_content_sidebar_wrap' (Below header) and wanted to show this in Pages (static page) area, which I can do. But, I don't want this widget to show in Blog page (Blog menu), so which php file I need to edit? I tried 'page_archive.php' and 'page_blog.php' but this is not the correct file.

    Btw... I used this snippet to hide the widget, I hope it's correct...

    /** Remove donate banner */
    remove_action( 'genesis_before_content_sidebar_wrap', 'donation_banner_area' );
    July 13, 2016 at 12:56 pm #189412
    Brad Dalton
    Participant

    Line 27 of genesis > lib > structure > loops.php they use this:

    if ( is_page_template( 'page_blog.php' ) ) {

    However, that doesn't mean it will work in your functions file.


    Tutorials for StudioPress Themes.

    July 13, 2016 at 10:52 pm #189438
    siamnaulak
    Participant

    Thanks braddalton, so how can I make it work in blog page? 🙂

    My example is something like this...
    If you check this page http://shiksharath.org/about-us/ I had create widget area at 'genesis_after_header' called THINK BRAVE – ACT BRAVE – LIVE BRAVE, but I can hide this in the homepage http://shiksharath.org/ as I had edited/modify 'page.php' template in my child theme. Like wise if I wanted to hide the widget area in Blog page http://shiksharath.org/category/events/ which file is that I need to modify?

    July 14, 2016 at 12:55 am #189442
    Brad Dalton
    Participant
    if ( ! is_category( 'events' ) || ! is_page( 'about' ) )
    return;
    

    Add the conditional tag after your function name.


    Tutorials for StudioPress Themes.

    July 14, 2016 at 2:29 am #189445
    siamnaulak
    Participant

    Hi braddalton, sorry that I am unable to do as you said...

    If you don't mind can you please guide me step by step? Sorry again that I am beginner in WordPress and Genesis 🙁

    July 14, 2016 at 11:32 am #189465
    Brad Dalton
    Participant

    I suggest you setup a test site locally if you want to learn how to modify PHP code.

    1. As previously indicated, the conditional checks should be added after the function name.

    Or

    2. Use this as a guide to learn how to swap out the conditional tags in this code example.

    If you get stuck, please post the code in a Github Gist and link to it from here.


    Tutorials for StudioPress Themes.

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

© 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