Changing Website Link in Listing

Discussion in 'GeoCraft WordPress Theme' started by jonkoren, May 5, 2014.

  1. jonkoren

    jonkoren New Member

    Joined:
    Jan 10, 2013
    Messages:
    13
    Likes Received:
    0
    Is there a way of changing the code so that instead of the actual website link (i.e. http://www.test.com) showing it can show "Click Here to See Website" or something along those lines in the business listing?
     
  2. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207
    Hello,

    Go to single-listing.php present in your theme directory and replace the current code
    Code:
     if ($field == 'geocraft_website') {
                                echo '<a target="new" href="' . get_post_meta($post->ID, $field, true) . '">' . get_post_meta($post->ID, $field, true) . '</a>';
    
    with code given below
    Code:
    if ($field == 'geocraft_website') {
                                echo '<a target="new" href="' . get_post_meta($post->ID, $field, true) . '">Click Here to See Website</a>';
     
    inline no. 271 and 321


    This will solve your issue.


    Thanks & Regards
    Gourav Shrivastava
     

Share This Page