Remove PHP statement generating comment line at end of posts
-
I just posted this on the “Hacks” forum, but I’m not sure if I posted it in the right place – so here it is again.
I’m coding my own theme design using BlankSlate. I’m not super familiar with PHP, and so I’m having trouble removing a command that calls the comments line at the end of the post. Here’s what the code looks like:
<div class="entry-footer"> <?php printf( __( 'This article was posted in %1$s%2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>. Follow comments with the <a href="%5$s" title="Comments RSS to %4$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'blankslate' ), get_the_category_list(', '), get_the_tag_list( __( ' and tagged ', 'blankslate' ), ', ', '' ), get_permalink(), the_title_attribute('echo=0'), get_post_comments_feed_link() ); if ( comments_open() && pings_open() ) : printf( __( '<a class="comment-link" href="#respond" title="Post a Comment">Post a Comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'blankslate' ), get_trackback_url() ); elseif ( !comments_open() && pings_open() ) : printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for post" rel="trackback">Trackback URL</a>.', 'blankslate' ), get_trackback_url() ); elseif ( comments_open() && !pings_open() ) : _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a Comment">Post a Comment</a>.', 'blankslate' ); elseif ( !comments_open() && !pings_open() ) : _e( 'Both comments and trackbacks are closed.', 'blankslate' ); endif; edit_post_link( __( 'Edit', 'blankslate' ), "\n\t\t\t\t\t<span class=\"edit-link\">", "</span>" ); ?> </div>
It puts out the following paragraph at the end of a single post: “This article was posted in Uncategorized. Bookmark the permalink. Follow comments with the RSS feed for this post.Both comments and trackbacks are closed. Edit”
I would like to remove the part: “Follow comments with the RSS feed for this post.Both comments and trackbacks are closed.”
I have tried removing different parts of the PHP, but I get this message: Parse error: syntax error, unexpected T_STRING in /home/acltmnco/public_html/testing/wp-content/themes/blankslate/entry-footer-single.php on line -” (line number depends on what parts of code I delete).
Can someone please tell me what part of the PHP code I need to remove to get rid of the comments/trackbacks message, without getting an error?
- The topic ‘Remove PHP statement generating comment line at end of posts’ is closed to new replies.