Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Chris Dillon

    (@cdillon27)

    Go to Testimonials > Settings > Client Section tab. Those shortcodes work for the widget and the soon-to-be-removed [wpmtst] shortcodes.

    I apologize for the lack of proper documentation.

    Thread Starter cynisme

    (@cynisme)

    Chris,

    please do not apologize. Your testimonial plugin rules!
    I got the client name field and an age field now working in the widget.
    But if I click on the read more link in the widget and go to the actual testimonial, the name and age are not displayed.
    Is there a way to fix this?
    https://www.fijnbrein.nl

    Plugin Contributor Chris Dillon

    (@cdillon27)

    Thanks, I’m glad you like it. And thanks for posting this; every new topic helps me see how the plugin is used “in the wild” and how it can be improved.

    I see what you mean now. The single testimonial page is using your theme’s default template file so it’s out of the plugin’s reach for the time being until I can learn some advanced methods :).

    To add custom fields to a single page, you need to copy the default template file and customize it specifically for the testimonial post type. (This is the tutorial I need to write.)

    It’s really very simple but requires some technical knowledge.
    Are you familiar with template files?
    Are you comfortable using FTP?

    Thread Starter cynisme

    (@cynisme)

    I do not think changing the template files will be a problem. I am not a very technical person, but I am a quick learner.
    So, If you have a few pointers…

    Plugin Contributor Chris Dillon

    (@cdillon27)

    Good!

    Every theme is different. With the TwentyThirteen theme, we need to copy two files in the directory /wp-content/themes/twentythirteen:
    single.php -> single-wpm-testimonial.php
    content.php -> content-testimonial.php

    To do that with most FTP programs like CoffeeCup or SmartFTP, you need to download it, rename it, and upload the renamed copy.

    WordPress will find the single-wpm-testimonial.php template file automagically when it displays a testimonial.

    You can edit those files either in admin > Appearance > Editor or on your computer before you upload them using a program like Notepad++.

    In single-wpm-testimonial.php, change

    <?php get_template_part( 'content', get_post_format() ); ?>

    to

    <?php get_template_part( 'content', 'testimonial' ); ?>

    In content-testimonial.php, add fields like

    wpmtst_field( 'client_name' );

    after the content( ... ) so the whole <div> looks like this:

    <div class="entry-content">
        <?php
          /* translators: %s: Name of current post */
          the_content( sprintf(
            __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen' ),
            the_title( '<span class="screen-reader-text">', '</span>', false )
          ) );
          ?>
          <p class="client">
            <div class="name"><?php wpmtst_field( 'client_name' ); ?></div>
            <div class="company"><?php wpmtst_field( 'company_name' ); ?></div>
          </p>
          <?php
          wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
        ?>
      </div><!-- .entry-content -->

    and obviously use whatever your custom field names are.

    Plugin Contributor Chris Dillon

    (@cdillon27)

    By the way, I would be remiss not to mention that this is a perfect time to consider using a child theme, especially if you plan on making more customizations involving template files and HTML.
    https://www.elegantthemes.com/blog/resources/wordpress-child-theme-tutorial
    https://themefuse.com/child-themes-what-they-are-how-to-use-them-and-why/

    Thread Starter cynisme

    (@cynisme)

    Worked like a charm! Thanks for the quick respons!

    Cheers!

    Corné

    Thanks! works great!

    I have the same request — I want to take charge of how the individual testimonials are displayed — but I can’t get my theme — yoo_master2_wp from yoothemes.com to recognize that the content is a testimonial. The “automagical” part isn’t happening.

    In the yoo_master theme all of the display comes from the warp framework, so the single.php and content.php files are found in this path:

    wp-content/themes/yoo_master2_wp/warp/systems/wordpress/layouts/

    If anyone can help with how to do the custom single-wpm-testimonial.php in this theme, I’ll be really grateful!

    Barb

    I’ve figured out a few things: I have to create styles/my-style/layouts and if I put modified verson of single.php there, it is in play for all single posts, including testimonials.

    If I rename it single-wpm-testimonial.php it is ignored.

    The yootheme lets me assign layouts and styles to certain post types and lists wpm testimonial in the options. I created a special style and layout to use just for testimonials, and put the modified single.php file there, but it does not seem to be getting the assignment to use the modified file.

    How is the automagic part supposed to work? Where WordPress recognizes a testimonial as a different post type?

    Plugin Contributor Chris Dillon

    (@cdillon27)

    Hi Barb,

    The WordPress automagic part is being overridden by the Warp Framework automagic part so we have to figure out the Warp equivalent for the techniques above.

    I will dig into it.

    Since this original topic is resolved, would you be so kind as to start a new support topic with your two posts above? That will help anyone else looking for help with a Yoo Theme to find it faster, and help me keep things straight.

    Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Read more link from widget’ is closed to new replies.