Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Custom Style Sheet for Home Page Template


  • ddbx46
    Participant

    @ddbx46

    Total Noob here.

    For some reason I cannot get my child theme header.php to call a separate style sheet for a custom homepage template that I created in the child theme root directory (using BP Columns theme).

    I have disabled Buddypress from que-ing up the style sheets and have used the following code in the header.php file in my child theme folder:

    
            
    	<link rel=&quot;stylesheet&quot; href=&quot;"/home.css
    	type="text/css" media="screen" />
    	
    	<link rel=&quot;stylesheet&quot; href=&quot;"
    	type="text/css" media="screen" />
    	
    

    No matter what I try it will not call the home.css style when my custom template home page loads.

    I’ve searched for the past several days but nothing seems to work.

    Any Ideas? as I just wanted a simple login page that looked different than the rest of the site.

    Thanks in advance

Viewing 7 replies - 1 through 7 (of 7 total)

  • ddbx46
    Participant

    @ddbx46

    http://pastebin.com/9wCkN1TY

    Any mods can help me clean this up please? sorry about that totally new here and it won’t let me edit my post. thanks


    @mercime
    Participant

    @mercime

    @ddbx46 the conditional for home page
    if ( is_home() || is_front_page() )

    and instead of using
    bloginfo(‘template_url’)
    should be
    bloginfo(‘stylesheet_url’)
    since bp collumns is a child theme


    ddbx46
    Participant

    @ddbx46

    Hello Mercime

    I did exactly as you specified above and it still doesn’t work.

    What else could I be missing?

    The CSS file is in the same directory as the php file is.

    I’ve went into settings then reading to make the same page a static homepage.

    Any ideas? How would you do it if you just wanted to style the homepage separately?

    Thanks as I really appreciate your help.

    Rgds
    T


    @mercime
    Participant

    @mercime

    @ddbx46 Please paste the complete code of your child theme’s header.php in pastebin.com and post the generated URI here.


    bp-help
    Participant

    @bphelp

    Try this and adjust accordingly:
    http://pastebin.com/UwshwEU2


    ddbx46
    Participant

    @ddbx46

    Thanks Mercime, however I was able to figure it out on my own…seems since bp columns is a child theme I needed to not only have the custom.css file imported but my own customs home.css imported as per below in my style.css file

    
    @import url( custom.css );
    
    @import url( home.css );
    

    Once I did that everything worked.

    bphelp I appreciate your idea too and will most likely be implementing that sometime down the road.

    Many thanks for both of your time as I really want to learn this stuff.

    rgds,
    T


    ddbx46
    Participant

    @ddbx46

    Hello bphelp,

    Well i thought I got it to work but it is not giving me the functionality that I am looking for.

    So just a couple of questions, If I tell BP to NOT enqueue the parent style sheet in functions.php then how & where do I call the style sheet that I want to use for the whole site?

    Then if I want to call one separate style sheet for a homepage template how would I go about doing that?

    It seems like most of the answers I’ve seen around the web are based on pre BP 1.5 when it didn’t enqueue style sheets because I’ve searched all over the place.

    Thanks in advance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Custom Style Sheet for Home Page Template’ is closed to new replies.
Skip to toolbar