Directions link

This topic contains 3 replies, has 2 voices, and was last updated by  Paolo 7 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #197244

    Rob
    Expired Member
    Post count: 2

    Hi,
    I would like to add a “directions” text link to the Popular places listings on the GD home page. I’m using the Geodirectory Framework Theme. I would like to add the link under the favorites link. Maybe it can link to map or directions button on details page? Any ideas would be appreciated.
    Thank you

    #197376

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    you can use this action:

    do_action( 'geodir_after_favorite_html', $post->ID, 'listing' );

    You should add something like this in your functions.php

    
    
    add_action('geodir_after_favorite_html','my_geodir_after_favorite_html',10,2);
    function my_geodir_after_favorite_html($post_id,$where){
      if($where=='listing'){
        echo '<a href="'.get_the_permalink().'/#post_map">directions</a></br>';
      }
    }
    

    Let us know if this is what you wanted.

    Thanks

    #197638

    Rob
    Expired Member
    Post count: 2

    SOLVED
    Perfect. I made a small change in the add-action. Changed ($where==’listing’) to ($where==’widget’). Added it to functions.php and it works great! You guys are awesome. Thank you for the fast response.

    #197964

    Paolo
    Site Admin
    Post count: 31206

    You are welcome 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket