• Hi,

    I’m using a plugin (WP Featured Content Slider) as a sticky post at the top of my page.
    It works fine, except that, as a post, it shows the original date of posting (12 April 2011). This kind of gives the impression that it’s “old news”, even though it isn’t, so I’d like to remove the date from this one post, while keeping it on all subsequent posts. I’d also like to remove the option to Comment on this particular post.

    I’ve had a search around the forum for similar problems, and I tried adding this code to the end of my single.php file, which I got from another thread:

    #post-929 .entry-meta .meta-prep, #post-929 .entry-meta a{
        display: none;
    }
    #post-929 .entry-meta span.vcard a, #post-929 .entry-meta span.comments-link a{
        display: none;
    }

    However, this hasn’t worked. Did it I put it in the wrong place/file?

    Any help appreciated…

    Many thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,

    That code is CSS and should go in your style.css file. This probably goes without saying, but if you’ve copied that code from another thread, you’ll want to make sure you have the correct post id (#post-929 above).

    If you’re not getting the results you want, a link to your site can help me or someone else give more specific help.

    Good luck.

    Thread Starter aga1

    (@aga1)

    Hi,

    Thanks for your quick answer. Ah, OK. Only the thread I copied it from stated that it should go in the single-post.php, or single.php file.

    I tried putting it in my style.css file, but there is a note from the theme author to say that you mustn’t do this, and to instead put any custom CSS in the provided ‘Theme Options’ box. Doing this hasn’t changed anything.

    BTW, the post-ID is correct:)

    My site: https://scandi-analysts.com

    Ok, looking at code on the site, this will work:

    #index-post-929-date {
    display: none;
    }
    Thread Starter aga1

    (@aga1)

    Yup, that worked perfectly: many thanks!

    What would the code be to remove the Comment option for this post, please?

    Well, the CSS would be:

    #index-post-803-comments { display: none; }

    but if you can, it would be better to go into the post editor and uncheck the “Allow comments” option. This will (probably) be beneath the text editor box, in a box labeled Discussion. If you’re not seeing that, pull down the Screen Options panel (tab in the top right-hand corner of the screen, next to the Help tab) and check the Discussion box to make it show on the page. Doing this will disable comments entirely for the post and should hide the comments bubble/count on the homepage.

    Thread Starter aga1

    (@aga1)

    Allow comments box was already unchecked.

    I added the code you just supplied (changing the post ID to 929, of course), however I can still see the bubble/no comments icon. It’s this I wish to remove.

    Change the selector back to what I posted above and it’ll work. I don’t know why the comments div and the post div have different ID numbers, but they do. I should have mentioned that specifically in my last comment.

    Thread Starter aga1

    (@aga1)

    LOL. Yes, it worked. I just assumed, in my ignorance, that the ID’s would be the same.

    Many thanks for all your help, really appreciated!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Removing date/comments from just one post’ is closed to new replies.