• 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

Add a widget with widget logic to home page and JUST other 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 › Add a widget with widget logic to home page and JUST other page

This topic is: not resolved

Tagged: conditional tags, widget logic

  • This topic has 2 replies, 2 voices, and was last updated 5 years ago by asbilly92.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • January 25, 2018 at 11:26 am #215730
    asbilly92
    Participant

    Trying to add a widget to just the home page and one other page. Using widget Logic, you can't use the usual array to call multiple pages like this: is_page(array(16,11)) because the home page is dynamically produced it's not a normal page template that's given an id; been looking and I can't figure it out. The front page in this case is called with: is_front_page(), not with an id.

    Normally for one page I would use: is_page ('about')

    So how would I do that using Widget Logic??

    Might it be something like: is_page ('about'), is_page ('is_front_page')??? don't think so but hummm ??

    Any help appreciated!!

    http://n/a
    January 25, 2018 at 11:31 am #215731
    Brad Dalton
    Participant

    Try

    is_front_page() || is_page ('about')

    Assuming the single page you want to target uses the slug 'about'.

    Uses the || PHP operator named OR


    Get Help – Book Consultation.

    January 25, 2018 at 11:46 am #215732
    asbilly92
    Participant

    OH wow, ok I didn't know that Widget Logic would accept the 2 pipes in place of commas..I will give it a try, and post back! Thank you!

  • 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