where to put alternate stylesheet code

Community Forums Forums General Discussion where to put alternate stylesheet code

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  braddalton 2 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #43471

    Working with Genesis – Agentpress theme. I have created a stylesheet for my homepage and have php code:

    if ( is_home() ) {
    <link rel=”alternate stylesheet” href=”/stylehome.css” type=”text/css” media=”all”
    } else {
    <link rel=”alternate stylesheet” href=”/style.css” type=”text/css” media=”all”

    From research I understand that this would typically go in the header.php file of the theme after the call of the normal style sheet- but the header.php is not the standard for Genesis and agentpress (header.php in Genesis has action calls).

    I placed the new stylesheet in my agentpress themes folder. I tried putting the php in the agent press functions.php but got a parse message:

    “Parse error: syntax error, unexpected ‘<‘ in C:\home\homessf.com\wwwroot\wordpress\wp-content\themes\agentpress\functions.php on line 21 ”

    Line 21 starts the <?php

    Can anyone help with what’s going on?



    Hi Kirk

    The best way to style one specific page is to use a custom class rather than add another style.css file.

    You can add a custom class for the home page or use the default class for the home page which is .home

    Code not displaying? Grab it on Github.

    More on custom classes.http://my.studiopress.com/snippets/custom-body-class/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.