• Hello all,

    I’m learning to theme a WP theme, I have coded a webpage with HTML and CSS, and I have a problem with the index.php

    My problem here is how to tweak the index.php layout. By default it is like a blog post, however, what I want is to have a grid based 3 column with another smaller grid based column which I have wrapped in Div using HTML .

    Like here
    https://versionsapp.com/

    But when I code it that way, the other pages, needs another code of CSS. So how do I solve this.. TIA

Viewing 3 replies - 1 through 3 (of 3 total)
  • Use this:
    <body <?php body_class(); ?>>

    BODY has class realated with current page.
    If the page is home, body has ‘home’ class,
    so you can specify some styles like:
    body.home{background-color:blue;}

    See Template Tags/body class

    Thread Starter mnowluck

    (@mnowluck)

    Thanks for the quick response.. Will play with it tonight and will let you know how things works

    Thread Starter mnowluck

    (@mnowluck)

    Sorry for the heading, Instead of creating a new thread each time, here I’m bringing up my issue here again with the template. I am trying to create a template for a wordpress which I’d like to use it as a CMS where we don’t need any comments on the page, more or less it is like a static page, what we need is just a website which can be easily edited with weekly annoucements about our organization. So, In short, We don’t need any comments on the site.

    Now, Do we really need the comment.php file in the template ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress home’ is closed to new replies.