• 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

Hook Help?

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 › Hook Help?

This topic is: not resolved

Tagged: Add Widget, genesis_register_sidebar, genesis_widget_area

  • This topic has 2 replies, 2 voices, and was last updated 3 years, 6 months ago by neonmoth.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • September 12, 2019 at 4:13 pm #493533
    neonmoth
    Participant

    Hi all,

    I'm still pretty new to PHP and hooks and all, and was wondering if I could get a little assistance with placing a widget area in multiple locations? I've registered the widget area and can apply it to regular pages. But I need to be able to include a blog page and an archive page in the same action. I tried a series of elseif statements but they don't appear to work. And most of what I'm finding online are instructions for doing the opposite -- one page with multiple widget areas. Happy to share code here if it helps, but it seems so basic to someone who knows php more than I do. Even a shove in the right direction would help. 🙂

    Thanks in advance!

    http://essance.thirdsidedev.com
    September 13, 2019 at 5:35 am #493540
    Brad Dalton
    Participant

    Try code like this.

    You can use conditional tags to execute the code on specific page types.


    Tutorials for StudioPress Themes.

    September 13, 2019 at 1:50 pm #493548
    neonmoth
    Participant

    Thanks. After following the rabbit hole one more time (and with extra coffee), it turned out I was using incorrect PHP operators (&& instead of ||). Thanks for leading me in the right direction.

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