Hi, first of all I wanted to congratulate you for the great work in this template. I need help removing from view the information about a post such as date, category and at the bottom where it says comments are off/closed.
Remove Post info
8 posts from 4 voices-
Posted 2 years ago #
-
There are a few places you need to make edits to the theme:
1.) Open up archive.php, find and remove this code:
<div class="entry-head"> <?php $category = get_the_category(); if(isset($category[0]->cat_name) || $terms != ''){ ?> <span class="categories"><?php _e('Posted in: ', 'avisio'); the_category(', '); echo $terms; ?></span><span class='limit'>-</span><?php } ?> <span class="date"><?php the_time('M d, Y') ?></span> <span class="comments"><?php comments_popup_link(__('No Comments','avisio'), __('1 Comment','avisio'), __('% Comments','avisio')); ?></span> </div>2.) Open up comments.php, find this code:
<span class="meta" id="comments"><?php comments_number(__('No Responses','avisio'), __('One Response','avisio'), __('% Responses','avisio') );?>and replace it with this:
<span class="meta" id="comments"><?php comments_number(__('','avisio'), __('One Response','avisio'), __('% Responses','avisio') );?>Also, find and delete this code:
<?php else : // comments are closed ?> <!-- If comments are closed. --> <span class="meta"><?php _e('Comments are closed.','avisio'); ?></span>3.) Open up single.php, find and delete this code:
<div class="entry-head"> <span class="categories"><?php _e('Posted in: ', 'avisio'); the_category(', '); echo $terms; ?></span><span class='limit'>-</span> <span class="date"><?php the_time('M d, Y') ?></span> <span class="comments"><?php comments_popup_link(__('No Comments','avisio'), __('1 Comment','avisio'), __('% Comments','avisio')); ?></span> </div>Let me know if you see comments / meta data on the site after completing these steps.
Posted 2 years ago # -
Hi,
all of this worked for me, but only when I replaced <span class="meta" id="comments"><?php comments_number(__('No Responses','avisio'), __('One Response','avisio'), __('% Responses','avisio') );?>
and inserted instead:
<span class="meta" id="comments"><?php comments_number(''), __('One Response','avisio'), __('% Responses','avisio') );?>
It screwed up my single post files, because when I load it, it loads the post, and in the comments section it then shows:
Parse error: syntax error, unexpected ',' in yaddayadda/wp-content/themes/avisio/comments.php on line 32
line 32 is exactly where the new code is pasted :-)
How to fix it?
Thanks!
Posted 2 years ago # -
Hey,
Sorry I made a mistake with the previous code for number 2 above, instead of replacing the text with:
<span class="meta" id="comments"><?php comments_number(''), __('One Response','avisio'), __('% Responses','avisio') );?>use:
<span class="meta" id="comments"><?php comments_number(__('','avisio'), __('One Response','avisio'), __('% Responses','avisio') );?>I have also corrected the code above.
James
Posted 2 years ago # -
Hey James,
thanks!
"No Responses" is out, but it still displays "to postname" afterward (postname being the actual postname, not the word postname). So before it was "No Responses to postname", and now it is "to postname". How can I take out that "to postname" too?
(I don't mind if it is taken out for completely, so even if there are comments, it's fine if there is just "3 Responses" instead of "3 Responses to postname").
Thanks!
Posted 2 years ago # -
You need to remove following code:
<span class="meta" id="comments"><?php comments_number(__('No Responses','avisio'), __('One Response','avisio'), __('% Responses','avisio') );?> <?php _e('to','avisio'); ?> “<?php the_title(); ?>”</span>or if you've already removed the code James mentioned above only this line:
<?php _e('to','avisio'); ?> “<?php the_title(); ?>”</span>from comments.php.
The Dude
Posted 2 years ago # -
Hey Dude,
thanks! Perfect :-)
Posted 2 years ago # -
Glad that I could help you.
Posted 2 years ago #
Reply
You must log in to post.














