Testimonial Rotator
[resolved] Show Author Info For Archive Page (2 posts)

  1. purplebabyhippo
    Posted 1 year ago #

    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?


  2. purplebabyhippo
    Posted 1 year ago #

    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() {
    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.]

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Testimonial Rotator
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic