• Hi all you smart people!

    I have a blog: blog.seed3.com.au

    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!

    Nate

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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 .post.post-357 { border: none; }
    to remove the border (the number is the post ID of the respective post)

    Thread Starter Innovnate

    (@innovnate)

    ok, so I made the change to the blog page.php, then I put the body.category .post.post-357 { 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 🙂

    page.php is not the likely template as it is responsible for static pages http://codex.wordpress.org/Template_Hierarchy

    possibly index.php

    Thread Starter Innovnate

    (@innovnate)

    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.