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

    (@cdillon27)

    Hi,

    That support topic is outdated as I decided to employ a template file instead.

    The main reason displaying the date is not a simple shortcode option like “excerpt” or “thumbnail” is where to put it. Some want it in the heading, some want it below the client name, and so on.

    So your best and easiest solution at this point is a custom template. If you want, I can create that for you or I can walk you through the steps.

    Hi,

    How can I display the testimonial date? I want it to be displayed right after the publisher name, on this address.

    https://newsite.lsosteopata.pt/testemunhos/

    Any suggestion?

    Thanks

    Plugin Contributor Chris Dillon

    (@cdillon27)

    Are you familiar with template files? Are you comfortable editing HTML and PHP?

    hum, yeah… more or less.
    If you guide me I may reach the goal.

    Plugin Contributor Chris Dillon

    (@cdillon27)

    Forgive me if you know some of this already.

    Copy /wp-content/plugins/strong-testimonials/templates/theme/testimonials.php to your theme directory (either via FTP or in your cPanel File Manager). For example, if your theme was named Farley, you would copy the file to /wp-content/themes/farley/testimonials.php.

    The plugin will now use that template file to display testimonials. That file has a specific set of fields that will ignore some of the shortcode options. You can edit the file in wp-admin > Appearance > Editor.

    To add the date, find the line that has

    wpmtst_field( 'client_name' )

    and add

    <?php the_date(); ?>

    after it like so:

    <div class="name"><?php wpmtst_field( 'client_name' );?> <?php the_date(); ?></div>

    I added one space in between; you can use a comma, etc. To add more spaces, use multiple ? or we can add some custom CSS.

    In PHP, two slashes // indicates a comment and you will several lines that are “commented out.” To show the full content, remove the two slashes before the_content(); and add two slashes before wpmtst_field(...) or remove that line altogether. Repeat for the other fields you want.

    Or contact me at wpmission.com and I will gladly take care of it.

    Hello – just wondering whether an easier way to display the date might be planned for an update of this plugin?

    Regards
    Melanie

    Plugin Contributor Chris Dillon

    (@cdillon27)

    Melanie – Yes, I plan to add the date field to the shortcode soon.

    Plugin Contributor Chris Dillon

    (@cdillon27)

    The date is now available in version 1.20 with optional “class” and “format” attributes.

    Example:

    [strong title thumbnail]
      [client]
        [field name="client_name" class="name"]
        [date class="date" format="F Y"]
      [/client]
    [/strong]

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Display date on testimonials’ is closed to new replies.