Support » Plugin: Testimonial Rotator » Show Author Info For Archive Page

  • Resolved Purple Hippo

    (@purplebabyhippo)


    I love this plugin, it is so simple and yet can can do so much.

    I am displaying all my testimonials on a page “testimonials” as a list by using the shortcode [testimonial_rotator id=1020 format=list]
    I am displaying the full content by placing code in my functions.php : if( ‘testimonial’ == get_post_type() ) {
    return ‘full-width-content’;

    but I want to also display the author information as per the single posts.
    How can I do this?
    What is the meta-box value for this field?

    https://wordpress.org/plugins/testimonial-rotator/

Viewing 1 replies (of 1 total)
  • Thread Starter Purple Hippo

    (@purplebabyhippo)

    I have worked out how to do this by adding the following to my functions.php (I’m using the Genesis Framework)

    add_action( 'genesis_before_loop', 'pbh_full_content_testimonials' );
    
    function pbh_full_content_testimonials() {
      if (is_post_type_archive('testimonial') ) {
    		remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
    		add_action( 'genesis_entry_content', 'pbh_do_post_content' );
    }
    
    }
    function pbh_do_post_content() {
    	the_content();
    
    global $post;
    
    $cite 				= get_post_meta( get_the_ID(), '_cite', true );
    
    	echo "<div class=\"testimonial_rotator_author_info cf-tr\">\n";
    	echo wpautop($cite);
    	echo "</div>\n";
    }

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 1 replies (of 1 total)
  • The topic ‘Show Author Info For Archive Page’ is closed to new replies.