Jump to content


Photo
- - - - -
Resolved

How do I create a new Content Section for a Template?

templates section

  • Please log in to reply
6 replies to this topic

#1 chrisdhanaraj

chrisdhanaraj

    Member

  • Members
  • 29 posts
  • Framework Version:4.1
  • Country: Country Flag

Posted 17 October 2012 - 02:34 PM

My homepage will require that the "features" section and "content" section to be a different color from the internal pages . I used CSS to change the features area as an example but it works globally. Would it make sense to have a special "features" and "content" section for the homepage so I can apply different CSS? And if so, I do I create these new sections?

#2 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 17 October 2012 - 02:38 PM

You can use css to target just the homepage, every page in wordpress has unique 'body' classes.

View the source of your page in the browser and look for the <body> tag and note the classes.

#3 chrisdhanaraj

chrisdhanaraj

    Member

  • Members
  • 29 posts
  • Framework Version:4.1
  • Country: Country Flag

Posted 17 October 2012 - 02:50 PM

Sounds logical.

here's what I have

body.home.page.page-id-2 section#features.container.no_clone.section-features.fix div.texture {
background-color: #f7f7f7;
}

That doesn't work but it's probably not right. Do I need to add a more complete path to the the div?

#4 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 17 October 2012 - 02:53 PM

Well im no good at CSS ;) but if you post a link to your site and exactly what you need, someone with some skills will be along.

#5 chrisdhanaraj

chrisdhanaraj

    Member

  • Members
  • 29 posts
  • Framework Version:4.1
  • Country: Country Flag

Posted 17 October 2012 - 03:07 PM

I got it to work! Putting a page id for every page is quite brilliant :)

Thanks for your help.!

#6 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 17 October 2012 - 03:08 PM

Your welcome :)

#7 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 17 October 2012 - 03:08 PM

The topic was marked as resolved.





Also tagged with one or more of these keywords: Resolved, templates, section