• Resolved DBCF WebAdmin

    (@dbcf-webadmin)


    I must be overlooking something simple … I am looking for css to control the color of the text when in display view. Thanks in advance, Dione

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

    (@cdillon27)

    Here’s a quick guide to custom CSS in testimonials:
    https://support.strongplugins.com/article/custom-css-strong-testimonials/#correct-element

    Usually, this works:

    .strong-view .testimonial {
      color: blue;
    }

    But you may need more to override your theme:

    .strong-view.default .testimonial p,
    .strong-view.default .testimonial-client {
      color: blue;
    }
    Thread Starter DBCF WebAdmin

    (@dbcf-webadmin)

    Hi Chris,
    I am feeling that I don’t understand css as easily as I would like to think. I’d found that article, but didn’t follow all.

    And this doesn’t seem to be working for me either. I tried both.

    Please excuse me I didn’t mention that while I am using the display view, default template, it is when I click Read more, I get the full page with the picture and text below …this text, I am not getting to turn white.

    In my theme, Generate Press, I do have the Colors | Body | Text set to the same color as my Colors | Body | Background color. I need this to remain for the text in a virtual page/pop-up box from my events plugin. So, I am hoping I can control this read more (virtual page??) text, to override my theme.

    When you gave the syntax to override my theme …after .testimonial …what is the p and the -client mean?

    Plugin Contributor Chris Dillon

    (@cdillon27)

    If the URL is like /testimonial/post-title that is your theme’s single post template and the CSS I provided will not work.

    Is this your theme? Are you using their Colors add-on?
    https://wordpress.org/themes/generatepress/

    Depending on the CSS that it’s generating, something like this may work:

    .single-wpm-testimonial .entry-content p {
      color: white;
    }

    If not, please post a link to the page so I can see the actual code.

    Thread Starter DBCF WebAdmin

    (@dbcf-webadmin)

    Yes, my url does look like that. I was looking at a branched off article, from the article link you gave earlier …and was starting to realize that it is a post. I was starting to think I’d have to go into the php code. THANK YOU SO MUCH!!! This works.

    Thread Starter DBCF WebAdmin

    (@dbcf-webadmin)

    Hey Chris, should I start a different topic …I have a question about adding author and other customization to this post template??

    I saw in a different response https://wordpress.org/support/topic/about-the-testimonial-read-more-link/ that you can walk us through creating a new template. I am comfortable doing so, following steps. I’ve done it before.

    I’d like to possible have the testimonial show up on a page with my look.

    Plugin Contributor Chris Dillon

    (@cdillon27)

    Every theme is different. This works for GeneratePress.

    1. Create a child theme. You may have to redo some Customizer options. Check your menus and widgets.

    Why a child theme? Because if you add or customize a template in the main theme, it will be deleted in the next theme update.

    2. Copy two files from the parent theme to the child theme.

    single.php
    content-single.php

    3. Rename each file.

    single.php –> single-wpm-testimonial.php
    content-single.php –> content-single-wpm-testimonial.php

    Why do this? Because the WordPress template hierarchy will check for custom post type template files first using this naming structure. If not found, the single blog post template will be used. Our post type is named ‘wpm-testimonial’.

    4. Edit single-wpm-testimonial.php.

    Change this line
    <?php get_template_part( 'content', 'single' ); ?>
    to this
    <?php get_template_part( 'content', 'single-wpm-testimonial' ); ?>

    5. Edit content-single-wpm-testimonial.php as you see fit.

    For example, to add a testimonial custom field named ‘client_name’:
    <?php wpmtst_field( 'client_name' ); ?>

    Tip:
    Try a plugin like What The File to determine exactly what template files are being used.

    Reference:
    https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/
    https://developer.wordpress.org/themes/basics/template-hierarchy/

    Let me know if I need to fill in any gaps.

    Thread Starter DBCF WebAdmin

    (@dbcf-webadmin)

    Thank you so much, Chris! I am making a backup and then will work on this. I’ll post back in a few hours. Thanks again!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Testimonial Text Color’ is closed to new replies.