Hiding tags in The Morning After

  • Author
  • #705905


    I’m trying to hide the display of tags in my post metadata. They can be useful for search engines but I’d prefer to make them not visible to readers. Too much metaclutter right there by the head. I can delete the words “filed under” but if there are any tags, they stay. I’d like to hide them. I’m using The Morning After. URL is http://piedtype.com/2011/09/12/thoughts-on-a-power-outage/ Any help would be appreciated.

    The blog I need help with is piedtype.com.


    Oh, not nice. The top line of metadata (author, date, comments link) and the second line (tags) are under the same selector in the CSS. It either all goes or none of it goes.


    If you don’t mind the trouble, you can hide that line alone via inline CSS in each post. Paste this at the very beginning of the post:
    <div style="position:relative;height:18px;font-size:0;background-color:#fff;margin-top:-30px;">-</div>
    But in that case you’ll have to add an excerpt in the Excerpt module of the editor, so that the dash I’ve put in the div won’t show on your front page. (The dash –or any other character– is needed otherwise the div will be stripped out if you switch the editor to Visual.)


    Good thinking there Panos. Clever is now your middle name.


    Thanks Rich! I like these little exercises, but we don’t know if the OP will like having to do this for each and every post…


    Well, it isn’t that much of a job to pop it in and do the excerpt thing once you have done it once.

    I was sort of surprised that TMA only had a single selector for both lines of meta at the top of the posts. I was like, ‘Wait, what?’



    Well, I was hoping I was just overlooking the selector or something. Guess not. I’d thought about trying to position something to cover the line, and for that I thank you. I’d have never figured that out by myself. Kind of a bummer having to do that with every post, though, plus do the excerpt. Would a non-breaking space work as well as the dash, only not show? I’ll have to check that out. The easiest thing would probably be to stop using tags, which I’ve been trying to do.

    Is there a good reason why the visual editor strips out some things put in on the HTML editor? Seems to me that should not happen. (Maybe it’s that ugly, ugly font…)

    Anyway, thanks, both of you, for the help.


    The Visual editor strips all seemingly useless pairs of div or p tags: pairs containing nothing, or a space, or the HTML for a space.



    Enclosing the whole div line in kept it from stripping the space, but the resulting space at the beginning of the front-page paragraph looked like a misalignment or something. Including a symbol like a bullet (ideally the same bullet used in the widget lists) looked good on the front page but was left floating in space on the main page.
    I might have been able to live with adding a line of code each time, but having to add an excerpt, and thereby change the content on the front page, was a bridge too far. So I just turned the tags into categories.

    Nevertheless, thanks again for the use of your brainpower.



    Oops. That blank was the “code” tags. Forgot the backticks.

The topic ‘Hiding tags in The Morning After’ is closed to new replies.