Support » Themes and Templates » remove posts borders on an individual post?

  • Hi all you smart people!

    I have a blog:

    which uses the following snippet of code (already from you smart people)

    body.category .post { padding: 35px 0px 25px 0px!important;
    width: 841px;
    padding: 12px !important;
    border: 1px solid #b1b1b1;
    margin-bottom: 15px;

    to give each post a thin grey border. This is great, but how can I ‘turn it off’ on a specific post? Ie in my case, I would like to put in a purely text post, and this does not need a border!

    Appreciate any help!


Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael


    Forum Moderator

    at the moment, you can’t, as your theme does not output any post specific css ids or classes.

    you might need to edit the loop of your template and change this line:

    <div class="entry post clearfix">

    for example to something like this:

    <div class="entry post <?php echo 'post-'.get_the_ID(); ?> clearfix">

    you could then use:
    body.category { border: none; }
    to remove the border (the number is the post ID of the respective post)

    ok, so I made the change to the blog page.php, then I put the body.category { border: none; } code in the style.css

    Is that right – because it doesn’t seem to work? I’ll try putting the code into the blog page.php next and see 🙂



    Forum Moderator

    page.php is not the likely template as it is responsible for static pages

    possibly index.php

    Thanks for your help – I have managed to get the border off in the category page, but not in the home page… cannot find anymore references to <div class=”entry post clearfix”> in any of the pages to change over 🙁

    entry.php was the one that changed the category post though fyi 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘remove posts borders on an individual post?’ is closed to new replies.