• 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

Change Whole Site css on referring url

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 › Change Whole Site css on referring url

This topic is: not resolved

Tagged: Conditional Css, referring url

  • This topic has 4 replies, 2 voices, and was last updated 7 years, 7 months ago by alistairmckenzie.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • October 26, 2015 at 8:00 am #169033
    alistairmckenzie
    Member

    HI could be a shot in the dark but does anybody know how I can change the style.css when coming from a certain site (url) I have a number of sites that are in a group and are all coloured differently, they all have a link to another site (Site B)

    What i want to happen is that if someone clicks through to Site B it will take the colourway from the referring site I would obviously create the style sheets on site B but how do I make it so it selects that certain style sheet, sorry if my explanation is a bit all over the place but hopefully not so you cannot understand
    Regards Alistair

    http://under construction
    October 26, 2015 at 8:29 am #169035
    Brad Dalton
    Participant

    Not sure what you want but you can try switch_theme

    https://codex.wordpress.org/Plugin_API/Action_Reference/switch_theme


    Tutorials for StudioPress Themes & WooCommerce.

    October 26, 2015 at 8:44 am #169037
    alistairmckenzie
    Member

    Thanks brad, but really all I want to do is if some one comes to Site B from SIte A I want to use style1.css instead of style.css or if they come to site B from site C it will use style2.css does that make sense if they come from any other site it will just remain style.css

    October 26, 2015 at 8:49 am #169038
    Brad Dalton
    Participant

    Thats what the function does, it switches the style sheet. You would also need another function to detect which site they come from.

    I doubt you'll find the entire custom function to copy and paste so you'll need to put it together.


    Tutorials for StudioPress Themes & WooCommerce.

    October 26, 2015 at 9:01 am #169039
    alistairmckenzie
    Member

    OK cheers Brad I'll give it a go

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 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