• 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

Custom header css for single.php

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 › Custom header css for single.php

This topic is: resolved
  • This topic has 1 reply, 1 voice, and was last updated 10 years, 11 months ago by lilolad.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • April 21, 2015 at 10:57 am #148692
    lilolad
    Member

    The website uses genesis sample theme, and i've got the .site-header to be position:absolute, so that it floats over the content for all the pages.
    But for the single blog pages, I don't want the .site-header to float over the content.
    Does anyone know how I can achieve this please?

    Here's the site I'm working on:
    http://176.32.230.9/orionsystems2.com/wordpress/services/ (the images are only placeholders so are all blurry)

    and the single post pages are (this is an example of one):
    http://176.32.230.9/orionsystems2.com/wordpress/orion-systems-completes-networked-access-control-system-for-major-uae-real-estate-developer/

    The header content overlaps the page content and I don't know how to stop it from doing this, only for the single.php pages?

    My single.php page currently reads as:
    <?php
    /**
    * This file adds the Single Post Template to any Genesis child theme.
    *
    * @author Brad Dalton
    * @example http://wpsites.net/
    * @copyright 2014 WP Sites
    */

    //* Add custom body class to the head
    add_filter( 'body_class', 'single_posts_body_class' );
    function single_posts_body_class( $classes ) {

    $classes[] = 'custom-single';
    return $classes;

    }

    // Force content-sidebar layout setting
    add_filter( 'genesis_site_layout', '__genesis_return_content_sidebar' );

    //* Run the Genesis loop
    genesis();

    Thanks very much in advance,
    Matt

    http://176.32.230.9/orionsystems2.com/wordpress/
    April 22, 2015 at 2:24 am #148764
    lilolad
    Member

    I think I've sorted this.
    What I did was used Genesis Simple Hooks plugin and in the wp_head Hook added the following:

    <?php
    if ( ( is_single() ) )
    { ?>

    <style type="text/css">
    .site-header {position:relative !important;}
    </style>

    <?php }
    ?>

    and ticked the PHP tick box.

    I hope this helps someone 🙂

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Custom header css for single.php’ 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

© 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