Recently I bought a theme at Themeforest called Ravage for my writing-blog.

Yesterday I found out that its not showing the "pretty" comments-section (which has a stylish newsletter sign up form and social share links implemented) when there are no comments to a post.

I have been scanning through the comments.php, but I can't seem to figure out where this "problem" lies. I tried contact the support of Icy Pixels (the creators) but then they showed me a page buried somewhere within the theme demo which also shows this strange behavior. So for them it's: "The comes as is, we're not going to change anything about it".

I can't imagine one blogger on this planet that would want to wait for people to share his work until the first comment is placed, so I hope someone here can help me out.

Here's a post with comments: http://www.ifkknrokk.com/rants/psychology/478/7-steps-dysthymia/

Here's a post without comments: http://www.ifkknrokk.com/writing/poetry/86/poem-honesty/

As you can see on the page with comments at the bottom a pretty grey boxed area appears with share links, subscribe form and everything! At the page without comments, it doesn't show anywhere.

Here's my comments.php:

<?php $template_directory =  get_template_directory_uri(); ?>

// Do not delete these lines or the sky will fall over your head
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');

if ( post_password_required() ) { ?>
<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'framework') ?></p>

/*  Display the comments + Pings

if ( have_comments() ) : // if there are comments ?>
<?php if ( ! empty($comments_by_type['comment']) ) : // if there are normal comments ?>
<div class="comments-container span12">
<div class="share-post">
<?php if( function_exists('zilla_likes') ) : ?> <?php zilla_likes(); ?> / <?php endif; ?><a class="facebook" href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" target="blank"><i class="icon-thumbs-up"></i> <?php _e('Like', 'framework'); ?></a> / <a href="http://twitter.com/home?status=<?php the_title(); ?> - <?php the_permalink();?>" target="blank" class="twitter"><i class="icon-twitter"></i> <?php _e('Tweet', 'framework'); ?></a>

<div class="subscribe-box">
background:url(http://www.ifkknrokk.com/wp-content/uploads/2012/10/mail.png) white no-    repeat scroll 1px center; padding:7px 7px 7px 50px; color:#666; font-weight:bold; text-decoration:none; border:1px solid #D3D3D3; 

<table style='border: none; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;' width='100%'>

<tr style='border:none; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;'>

<td align='center' style='border:none; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;'> <p style='color:#666; font-weight: bold; font-style: italic; font-size: 22px; margin:0px 0px 5px 0px; '>Receive free daily updates.</p>
<form action='http://feedburner.google.com/fb/a/mailverify' class='feedburner' method='post' onsubmit='window.open(&apos;http://feedburner.google.com/fb/a/mailverify?uri=ifkknrokk&apos;, &apos;popupwindow&apos;, &apos;scrollbars=yes,width=550,height=520&apos;);return true' style='margin: 0pt;' target='popupwindow'>
<input name='uri' type='hidden' value='ifkknrokk'/>
<input name='loc' type='hidden' value='en_US'/>
<input style="width: 250px;" class='dcstyle' name='email' onblur='if (this.value == &quot;&quot;) {this.value = &quot;Enter your email…&quot;;}' onfocus='if (this.value == &quot;Enter your email…&quot;) {this.value = &quot;&quot;}' type='text' value='Enter your email…'/>
<input style="width: 90px;" alt='' class='dcsubmit' title='' type='submit' value='Submit'/>
<font size="1"><a href='http://feeds.feedburner.com/ifkknrokk' rel='nofollow' target='_blank' title='Subscribe to RSS Feed'>Or add this feed to your RSS-reader.</a>
<td align="center" style='border:none; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;'><p style='color:#666; font-style: italic; font-weight: bold; font-size: 22px; margin:0px 0px 5px 0px; '>Connect with me.</p>

<a href="http://twitter.com/ifkknrokk" rel='nofollow' target='_blank' title='Follow us on Twitter'><img src='http://www.ifkknrokk.com/wp-content/uploads/2012/10/twitter.png'/>        </a>
<a href="https://plus.google.com/u/0/109115922375442320105/about" rel='nofollow' target='_blank' title='Follow us on Google+'><img src='http://www.ifkknrokk.com/wp-content/uploads/2012/10/google+.png'/></a>
<a href="http://www.facebook.com/ifkknrokk" rel='nofollow' target='_blank' title='Follow us on Facebook'><img src='http://www.ifkknrokk.com/wp-content/uploads/2012/10/facebook.png'/></a>
<a href="http://youtube.com/user/ifkknrokk" rel="nofollow" target="_blank" title="Subscribe to my Youtube-channel!"><img src="http://www.ifkknrokk.com/wp-content/uploads/2012/10/you_tube.png"/></a>


<div class="comments-message">
<?php if(get_option('icy_comments_message') == '') : ?>
<?php _e('Write us your thoughts about this post. Be kind & Play nice.', 'framework'); ?>
<?php else : ?>
<?php echo get_option('icy_comments_message'); ?>
<?php endif; ?>     

<!-- BEGIN .list-of-comments -->    
<div class="span12 commentaries-border">

<!--BEGIN .list-of-comments OUTPUT -->
<ol id="comments" class="list-of-comments">

<?php wp_list_comments('type=comment&avatar_size=48&callback=icy_comment'); ?>

<!--END .list-of-comments OUTPUT -->

<?php endif; ?>

<?php if ( ! empty($comments_by_type['pings']) ) : // if there are pings ?>

<!--START separated pings listing -->
<h4 id="pings"><?php _e('Trackbacks for this post', 'framework') ?></h4>

<ol class="pinglist">

<?php wp_list_comments('type=pings&callback=icy_list_pings'); ?>

<!--END separated pings listing -->

<?php endif; ?>

<!--BEGIN comment navigation -->
<div class="navigation">

<div class="alignright"><?php next_comments_link(); ?></div>
<div class="alignleft"><?php previous_comments_link(); ?></div>

<!--END comment navigation -->

<!--END .list-of-comments -->


/*  Dealing with no comments or closed comments

if ('closed' == $post->comment_status ) : // if the post has comments but comments are now closed ?>

<p class="nocomments"><?php _e('Comments are closed now.', 'framework') ?></p>

<?php endif; ?>

<?php else :  ?>

<?php if ('open' == $post->comment_status) : // if comments are open but no comments so far ?>

<?php else : // if comments are closed ?>

<?php if (is_single()) { ?><p class="nocomments"><?php _e('Comments are closed.', 'framework') ?></p><?php } ?>

<?php endif; ?>

<?php endif;

/*  Comment Form

if ( comments_open() ) : ?>

<div id="respond" class="span12" style="margin-left: 0">

<h3 class="no-bottom"><?php comment_form_title( __('Leave a reply.', 'framework'), __('Reply to %s', 'framework') ); ?></h3>

<div class="cancel-comment-reply">       
<?php cancel_comment_reply_link(); ?>

<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>    
<p><?php printf(__('You must be %1$slogged in%2$s to post a comment.', 'framework'), '<a href="'.get_option('siteurl').'/wp-login.php?redirect_to='.urlencode(get_permalink()).'">', '</a>') ?></p> 
<?php else : ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" class="span12" id="comments-form" style="margin-left: 0">

<?php if ( is_user_logged_in() ) : ?>       
<p><?php printf(__('Logged in as %1$s. %2$sLog out &raquo;%3$s', 'framework'), '<a href="'.get_option('siteurl').'/wp-admin/profile.php">'.$user_identity.'</a>', '<a href="'.(function_exists('wp_logout_url') ? wp_logout_url(get_permalink()) : get_option('siteurl').'/wp-login.php?action=logout" title="').'" title="'.__('Log out of this account', 'framework').'">', '</a>') ?></p>        
<?php else : ?>

<input type="text" name="author" value="Name (required)" id="author" value="<?php echo esc_attr($comment_author); ?>" size="20" tabindex="1" onfocus="if (this.value == 'Name (required)') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Name (required)';}"/>

<input type="text" name="email" value="Email (required)"  id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="20" tabindex="2" onfocus="if (this.value == 'Email (required)') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Email (required)';}"/>

<input type="text" name="url" id="url" value="Your Website" size="20" tabindex="3"onfocus="if (this.value == 'Your Website') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Your Website';}"/>

<?php endif; ?>

<textarea name="comment" id="comment" cols="55" rows="10" tabindex="4" value="Write your comment here" onfocus="if (this.value == 'Write your comment here') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Write your comment here';}"></textarea>

<p class="no-bottom">
<input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'framework') ?>" />
<?php comment_id_fields(); ?>
<?php do_action('comment_form', $post->ID); ?>


<?php endif; // If registration required and not logged in ?>
<?php endif; // if you delete this the sky will fall on your head ?>

I really hope on of you guys can find the fix because this is frustrating as hell (especially because the designer doesn't want to help me - he just sent me an e-mail that as soon as he comes home he will look into it to see if it's possible (!) of course it's possible! Everyone else is doing it!

Anyway, sorry for complaining, any help is appreciated.


Daan van den Bergh

  • It's not too much to ask to have the same comment section appearing under each post. Even free themes have that. So, honestly: stop that. – Loki Oct 27 '12 at 6:16
  • And besides that, as you can see below the answer was really simple. I paid 35 bucks for the theme (which I think is enough for such a simplistic theme) and I can expect a bit of customer support in return. He could've just spent 1 minute sending me an e-mail telling me what to do, instead of spending that minute typing: "That does not fall under support. The theme comes as is." – Loki Oct 27 '12 at 6:26
  • But that's the "rules". He as a developer agreed and you as custom as well. Btw: "simplistic"/minimalistic doesn't mean it's easy to code and design. – kaiser Oct 27 '12 at 9:52
  • Its poor design choice by theme developer to hide social logic if no comments are present, but its their choice to do so. Its also their choice to not support any requests to help you modify the template to your liking because its not a bug or script error. Sucks, yeah. Common sense might say "just help the guy out", but its not always practical to do so. In fairness he did say he will look into it for you, so I'd have given him the opportunity to do so. You can always get support here of course, but save the ranting for your blog, when its very much a case of "you get what you paid for". – Adam Oct 27 '12 at 10:51
  • Thank you, userabuser for the constructive answer. I guess what frustrated me the most is that afterwards it appeared to be such a simple solution to my problem. It took me one day to figure out, when for him - since he designed it that way - would've cost 10 second to type me an e-mail saying: "Just move all the code between < div comment-form > and < / div > to the single.php and you're done." But you are right, I'm sorry for ranting. – Loki Oct 27 '12 at 13:04

Fixed it already.

I moved the entire code between and to single.php and only left comments.php to handle the comment field.

Now I think about it, comments.php is a really weird place to put lay-out styles for share-links etc. Everybody else always puts it in the single.php.

  • Please mark your question as answered, tick the little checkmark below the the arrows on the left side. – fuxia Oct 26 '12 at 23:29
  • When I do that it says: you can accept your answer tomorrow. So will accept it tomorrow. :) – Loki Oct 27 '12 at 6:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.