• Resolved siriusly

    (@siriusly)


    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: https://bit.ly/SRPsl2
    WP 3.5.1
    Premium Testimonials Widget version

    https://www.ads-software.com/extend/plugins/testimonials-widget/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Michael Cannon

    (@comprock)

    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

    Thread Starter siriusly

    (@siriusly)

    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 ) {

    Plugin Contributor Michael Cannon

    (@comprock)

    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 ) {
    Thread Starter siriusly

    (@siriusly)

    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…
    https://bit.ly/YFD4rD

    Thank you!!

    Plugin Contributor Michael Cannon

    (@comprock)

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

    Thread Starter siriusly

    (@siriusly)

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

    Plugin Contributor Michael Cannon

    (@comprock)

    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?

    Thread Starter siriusly

    (@siriusly)

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Hide *post* author on single testimonial page’ is closed to new replies.