• 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 Stylesheet in Custom Template

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 › General Discussion › Custom Stylesheet in Custom Template

This topic is: resolved
  • This topic has 3 replies, 3 voices, and was last updated 13 years ago by taylorishere.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • March 19, 2013 at 6:54 pm #29539
    taylorishere
    Member

    I think I forgot how to do this, but what's the code to call a different style sheet to a custom template (I will also call the original stylesheet in the new one).

    Gracias.

    March 23, 2013 at 9:36 am #30687
    weslinda
    Member

    According to the WordPress Codex, this is the proper way to add a stylesheet to your theme.  Add the code to your functions.php file in your custom theme.

    http://codex.wordpress.org/Function_Reference/wp_enqueue_style#Loading_stylesheets_in_WordPress_themes


    Loving the Genesis Life!

    March 24, 2013 at 8:27 pm #31035
    Gary Jones
    Member

    As you say you'll be calling the original one, my suggestion would be to put the styles at the bottom of the existing style sheet, but make use of the body class that each templated page ads, to narrow the scope of the selector.

    If you can give a URL of a page using a template, and an example of what you'd like different on that page, someone can give you a starting point in code.


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

    March 25, 2013 at 11:48 am #31140
    taylorishere
    Member

    Here's the code I used on the custom_template.php file (replace custom_template name with whatever):

    remove_action( 'genesis_meta', 'genesis_load_stylesheet' );
    add_action( 'genesis_meta', 'custom_stylesheet' );
    function custom_stylesheet(){?>
    <link rel="stylesheet" href="http://CHILD THEME/custom_template.css" type="text/css" media="screen" /><?php
    }

    And here's what I called in my CSS:

    @import url("http://CHILD THEME/style.css");

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ 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

© 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