WordPress.org

Ready to get started?Download WordPress

Forums

Testimonials by Aihrus
[resolved] Hide *post* author on single testimonial page (9 posts)

  1. siriusly
    Member
    Posted 1 year ago #

    I apologize if this has been addressed, but I am not finding it. I am trying to figure out how to hide the post author at the bottom of a single testimonial page (and not the regular blog pages). Testimonials are all being posted by the site's owner, rather than by the testimonial author, so it looks odd to have his name there. I've tried this to no avail:
    #article .postauthor {
    display:none;
    }
    Thank you!
    Site: http://bit.ly/SRPsl2
    WP 3.5.1
    Premium Testimonials Widget version

    http://wordpress.org/extend/plugins/testimonials-widget/

  2. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    This is going to be a change in your theme's content-single.php file.

    Basically, near line 34, you need to change code to like the following

    if ( is_post_type_archive( Testimonials_Widget::pt ) ) {
                    $utility_text = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
                } elseif ( '' != $tag_list ) {
    …

    @ref is_post_type_archive

  3. siriusly
    Member
    Posted 1 year ago #

    Thanks! So here's the section I have now -- when I uploaded the revised content-single.php to the child theme folder, the testimonial post no longer displays on the page. (sorry, not a PHP expert by any means)

    ...

    /* translators: used between list items, there is a space after the comma */
    $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
    
    /* BEGIN remove name of author at bottom of testimonials */
    			if ( is_post_type_archive( Testimonials_Widget::pt ) ) {
                    $utility_text = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
                } elseif ( '' != $tag_list ) {
    /* END remove name of author at bottom of testimonials */
    
    if ( '' != $tag_list ) {
    				$utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
    			} elseif ( '' != $categories_list ) {

    ...

  4. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    Change

    } elseif ( '' != $tag_list ) {
    /* END remove name of author at bottom of testimonials */
    
    if ( '' != $tag_list ) {

    into

    /* END remove name of author at bottom of testimonials */
    } elseif ( '' != $tag_list ) {
  5. siriusly
    Member
    Posted 1 year ago #

    That didn't do it. I see the logic, but don't understand the syntax, so I hope I at least copied & pasted correctly! Here's the post example...
    http://bit.ly/YFD4rD

    Thank you!!

  6. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    Please copy and paste your content-single.php file to http://pastebin.com/. Then I'll see about fixing it.

  7. siriusly
    Member
    Posted 1 year ago #

    http://pastebin.com/qBCX20ta
    The file lives in the site's Twenty Eleven child theme folder.
    Thank you!!!

  8. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    The pastebin code looks fine. Have you ensured that this child file is being called via something like a <?php echo "I'm here"; ?> at the top?

  9. siriusly
    Member
    Posted 1 year ago #

    Still working on getting to checking that... will get back to you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic