Archived

This topic is now archived and is closed to further replies.

  • 0

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


Question

Posted · Report post

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?

Share this post


Link to post
Share on other sites

6 answers to this question

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

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?

Share this post


Link to post
Share on other sites

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

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

Thanks for your help.!

Share this post


Link to post
Share on other sites

Posted · Report post

Your welcome :)

Share this post


Link to post
Share on other sites

Posted · Report post

The topic was marked as resolved.

Share this post


Link to post
Share on other sites