mgsisk / inkblot

Inkblot is an elegant, fully responsive, highly customizable Webcomic-ready WordPress theme.
http://wordpress.org/themes/inkblot
45 stars 11 forks source link

I'd like to pare down the stuff included in my Webcomics Posts. (title, post info, etc.) #42

Closed Victorre closed 9 years ago

Victorre commented 9 years ago

Hello, thanks for your support on my last request. This one is a laundry list of things I'd like to snip out of my webcomic posts. (I've tried hiding the visibility of the H1 tag, but that also eliminates elements I wanted to keep.)

I don't know how much of this is simple, so I put it in one post for convenience. If anything falls outside of the level of free support you can provide here, or should perhaps have its own thread, just let me know.

Page Area:

Comments Area:

To clarify, I only want to eliminate the appearance of these items from my posts, not the items. So I still, for example, want to input a title while uploading a webcomic for ease of management. I just don't want it to show up in the post itself.

mgsisk commented 9 years ago

To hide the post title and meta data:

.webcomic2 .post-header,
.webcomic2 .post-details {
    display: none;
}

The .webcomic2 class is collection-specific; your first collection would be .webcomic1, the second one is .webcomic2 (this appears to be the collection for the comic on your homepage), etc.

For the required fields in the comments section the only (simple) way to get rid of both the icons and the "Required fields…" message is to uncheck Comment author must fill out name and e-mail on the Settings > Discussion page. The icons are CSS flare, but WordPress itself adds the "Required fields…" message and there's no way to filter it out without unchecking that setting or building a custom comment form (which can be done, if you like).

To hide the website and allowed HTML tags, try:

.comment-form-url,
.comment-form .form-allowed-tags {
    display: none
}
Victorre commented 9 years ago

Ok, thanks. Both code snippets worked like a charm.

While I was looking up tutorials on how I might do this earlier I had read that a display: none can create problems with search engines. Would that not be true in this case?

mgsisk commented 9 years ago

There's nothing inherently wrong with using display: none; to hide content, but it can be risky depending on how you're using it. I don't think any of the uses here would actually impact your search rank, but there are more direct ways to remove this content:

  1. For the webcomic title and meta data, open up inkbot/webcomic/content.php and remove lines 32–68 (starting with <header class="post-header">… all the way to </header>)
  2. For the comments, open up inkblot/comments.php and change line 37 – comment_form(); – to this:
comment_form(array('comment_notes_after' => ''));

That will get rid of the "Allowed HTML" message. For the URL field, you'll need to add this to inkblot/functions.php (at the bottom should be fine):

function inkblot_remove_comment_url($fields) {
    unset($fields['url']);

    return $fields;
} add_filter('comment_form_default_fields', 'inkblot_remove_comment_url');
Victorre commented 9 years ago

Thanks very much for the link and the alternate solution, I think the I understand the display: none; issue a good deal better now.