WordPress.org

Ready to get started?Download WordPress

Forums

GC Testimonials
Link to website can't have name of website? (6 posts)

  1. Jack
    Member
    Posted 5 months ago #

    I added the company name and the website addess. When viewing these fields on the front end, both the company name amd the website link have the same title, that of the company name. Can't the website link just have the name of the url entered? Just http://www.companywebsite.com?

    https://wordpress.org/plugins/gc-testimonials/

  2. Chris Dillon
    Member
    Posted 5 months ago #

    The plugin does not provide that option. Would you like a hack to get around that?

  3. Jack
    Member
    Posted 5 months ago #

    Hack yeah! ;)

  4. Chris Dillon
    Member
    Posted 5 months ago #

    Hack yeah!

    :D That's my new motto!

    In admin, go to Plugins > Editor then select GC Testimonials. In testimonials.php find this line:

    $display .= '<a href="'.gct_get_website( $testimonial->company_website ).'" target="blank">'.$testimonial->company_name.'</a>';

    and change company_name to company_website. Or replace it with this:

    $display .= '<a href="'.gct_get_website( $testimonial->company_website ).'" target="blank">'.$testimonial->company_website.'</a>';

    To exclude the http:// use this instead:

    $display .= '<a href="'.gct_get_website( $testimonial->company_website ).'" target="blank">'.str_replace('http://', '', $testimonial->company_website).'</a>';
  5. Chris Dillon
    Member
    Posted 5 months ago #

    Note: That's just for the shortcodes. The widget has a similar line:

    echo '<a href="'.gct_get_website( $testimonial->company_website ).'" target="blank">'.$testimonial->company_name.'</a>';

    that can be modified the same way.

  6. Jack
    Member
    Posted 4 months ago #

    Works! Thanks!
    Sorry I got back here so late. Bit busy :)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.