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

  1. Jack
    Posted 2 years 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?


  2. Chris Dillon
    Posted 2 years ago #

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

  3. Jack
    Posted 2 years ago #

    Hack yeah! ;)

  4. Chris Dillon
    Posted 2 years 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
    Posted 2 years 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
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • GC Testimonials
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.