• 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

Use different header and body section for different pages

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 › Use different header and body section for different pages

This topic is: resolved

Tagged: Different Header

  • This topic has 7 replies, 3 voices, and was last updated 8 years ago by dpalme.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • November 6, 2017 at 7:33 pm #213340
    dpalme
    Participant

    I have installed the simple hooks plugin and modified the header and before body hooks on http://www.palmeacres.com. Main page works fine (still need to fix the links) but I would like a different header and body content for the other pages, is there a way to "unhook" the hooks from the pages?

    http://www.palmeacres.com
    November 7, 2017 at 5:28 am #213352
    Victor Font
    Moderator

    You don't unhook per se. You use WordPress conditional tags to limit code to specific pages. https://codex.wordpress.org/Conditional_Tags


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    November 7, 2017 at 6:51 am #213353
    Brad Dalton
    Participant

    You can use a plugin like WP Display Header

    Or

    Custom code


    Tutorials for StudioPress Themes.

    November 7, 2017 at 9:18 am #213355
    dpalme
    Participant

    I tried the conditional tag as follows in the genesis_before hook

    <?php
    if (is_front_page() ) {
    ...

    ?>

    Turned on php for the hook and it removes the code I want executed on the main page. It is a separate page that is set to be static in the settings | reading section.

    What am I doing wrong?

    November 7, 2017 at 9:23 am #213356
    Brad Dalton
    Participant

    Did you want to display different header images on different pages?


    Tutorials for StudioPress Themes.

    November 7, 2017 at 9:26 am #213357
    dpalme
    Participant

    I need different code on different pages, not just an image.

    If needed I can post a sample of the code.

    November 7, 2017 at 9:31 am #213358
    Brad Dalton
    Participant

    Please paste the code in a Github Gist and link to it from here.


    Tutorials for StudioPress Themes.

    November 8, 2017 at 7:43 am #213382
    dpalme
    Participant

    I was able to figure out how to structure the conditional statement. Need to do some clean up on it but its working.

    I saw something unrelated to this question so I'll post it in another.

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Use different header and body section for different pages’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 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