SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    724
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    how do I go about changing the body color in a subtemplate?

    Hello all!
    I have gotten around to using a subtemplate how do I go about changing the body color and other more general and global attributes?
    would creating a second header, calling it header2.php work? doesn't seem likely. calling a something in the get header function?

    thx
    D

  2. #2
    SitePoint Evangelist snecz's Avatar
    Join Date
    Mar 2007
    Location
    Warsaw, Poland
    Posts
    429
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You mean child theme in WordPress? Just duplicate the files in child theme and correct them as you wish.
    Warsaw - the city that survived its own death.
    EMM8 - Profesjonalne Strony Internetowe
    Projektowanie Stron WWW

  3. #3
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    724
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi, little bit diff & not using child themes. but...using a sub template.
    So I created a diff page. called it subtemplate.php put the template name w/in php comments at the top of the page.
    all in the same dir/folder.

    And...found out the answer & putting it here in case it help anyone else.

    under the original bit where you tell wp to grab the css style sheet.

    Code:
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
    you add this second bit.

    Code:
    	<?php if(is_page_template('subTemplate.php')) {?>
    	<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/subtemplate.css">
    	<?php  }?>
    it works. Happy :-)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •