Welcome, guest!

Feel free to read the blog, browse for themes, or join the club.

Hybrid 0.7 and Hybrid News - "Add Comment" issue

  1. Hi - here's a 2nd thing I can't figure out - I had added this filter:
    add_filter( 'hybrid_byline', 'my_extra_comments_link' ) in functions.php. . .
    to include "Add a comment" to the right of the date, under post titles for "excerpts" on the front page of Hybrid News.
    It worked fine. . .until the upgrade to Hybrid 0.7 (only done in dev site so far).
    Didn't change anything else, just ran the upgrade. Thoughts?
    Thanks.
    Cheryl

  2. this is not bliss theme, sorry - can't see how to switch to Hybrid Theme. . .

  3. You must be a logged-in exclusive member to view this reply.

  4. hope I did that right w/ the backticks. I added that code from your instructions ;-)
    also yes, 2.9.1 and it's hybrid 0.7.1 upgraded through the wp dashboard. thanks!

  5. backtick on every line or just beginning and end?
    trying with one at beginning and one at end, sorry.

    add_filter( 'hybrid_byline', 'my_extra_comments_link' );
    
    function my_extra_comments_link( $byline ) {
    	global $post;
    
    	if ( comments_open() && 'post' == $post->post_type ) {
    		$number = get_comments_number();
    		if ( $number == 0 )
    			$comments_link = ' <span class="byline-sep byline-sep-comments separator">|</span> <a class="comments-link" href="' . get_permalink() . '#respond" title="' . sprintf( __('Comment on %1$s', 'hybrid'), the_title_attribute( 'echo=0' ) ) . '">' . __('Add a Comment', 'hybrid') . '</a>';
    		elseif ( $number == 1 )
    			$comments_link = ' <span class="byline-sep byline-sep-comments separator">|</span> <a class="comments-link" href="' . get_comments_link() . '" title="' . sprintf( __('Comment on %1$s', 'hybrid'), the_title_attribute( 'echo=0' ) ) . '">' . __('1 Comment', 'hybrid') . '</a>';
    		else
    			$comments_link = ' <span class="byline-sep byline-sep-comments separator">|</span> <a class="comments-link" href="' . get_comments_link() . '" title="' . sprintf( __('Comment on %1$s', 'hybrid'), the_title_attribute( 'echo=0' ) ) . '">' . sprintf( __('%1$s Comments', 'hybrid'), $number ) . '</a>';
    	}
    
    	return str_replace( '</p>', $comments_link . '</p>', $byline );
    }
  6. that looks better ;-)

  7. You must be a logged-in exclusive member to view this reply.

  8. Groovy - I replaced with the new code and it's back. Only other thing is just a preference - we've been using "Add a comment" and "1 comment" instead of "Leave a Response." Would you kindly point me to where that would be? Many thanks.
    Cheryl

  9. You must be a logged-in exclusive member to view this reply.

  10. Hi -
    I put the original code back in - and now none of it shows up. I don't have anything else filtering the byline, so am back where we started. . .

  11. Hi -
    I put the original code back in - and now none of it shows up. I don't have anything else filtering the byline, so am back where we started. . .

  12. sorry for duplicate, internet went down, now back up

  13. You must be a logged-in exclusive member to view this reply.

  14. Hi -
    the link to the dev site is http://dev.boulderjewishnews.org/
    thanks ;-)

  15. You must be a logged-in exclusive member to view this reply.

  16. OHHHHHHH! I hadn't thought about that. Then the longer, "Add a comment" code is probably fine, will upgrade the live site in next day or so - my bad, sorry to trouble you and as always thank you for everything. The live site is http://boulderjewishnews.org. We made just a few changes to Hybrid News and love it ;-)

Reply

You must log in to post.

Limited Access

If you have an account, please take a moment to log in.

Non-exclusive members have limited access to the support forums.

To enjoy the full range of support, sign up for an exclusive membership in the theme club.

Support Forums

  • Bliss Theme (183 posts)
  • Hybrid Theme (16,863 posts)
  • Options Theme (10,321 posts)
  • Structure Theme (2,624 posts)
  • Visionary Theme (767 posts)
  • bbPress Themes (293 posts)
  • WordPress Plugins (1,614 posts)
  • General Discussion (3,909 posts)