WordPress.org

Support

Support » Plugins and Hacks » Set sidebar content for page and it’s subpages

Set sidebar content for page and it’s subpages

  • abelcreative

    @abelcreative

    I’m using this in my sidebar:

    if (is_page('about')) {
                 // our about page.
                 echo "<h1>title</h1>
                 <ol><li>Content here</li></ol>";

    I’m wondering if there’s a way to write this so that that block of content appears on the about page and any child page of the about (i.e. pages with About marked as a page parent)

  • The topic ‘Set sidebar content for page and it’s subpages’ is closed to new replies.