Send Enquiry link

This topic contains 10 replies, has 3 voices, and was last updated by  Stiofan O’Connor 6 years, 8 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #417452

    Joy
    Buyer
    Post count: 1076

    Hello, how can I change the url for the “Send Enquiry” link? We would like to utilize another form. Thank you.

    #417526

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    I will flag your question for the developers.

    Also, you might consider creating a new custom field that you can add to those listings:

    https://wpgeodirectory.com/custom-field-improvements-in-new-v1-6-6/

    #417543

    Stiofan O’Connor
    Site Admin
    Post count: 22956
    
    
    add_filter('b_send_inquiry_url','_my_new_url');
    function _my_new_url(){
        return "https://example.com";
    }

    Stiofan

    #418496

    Joy
    Buyer
    Post count: 1076

    Can you please check that this is still working? I’ve tried to use it but hasn’t changed the link. The default modal form still appears. I’ve also cleared my caches.

    I’m trying to have it scroll down to a particular id section on the page. Since the urls will be dynamic since it is based on the listing names, is this something I’ll be able to do? Thank you.

    #418558

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I’m not sure it will work for an on page item, but only for changing page.
    You would probably have to filter the whole function or replace the link with JS.

    Stiofan

    #418603

    Joy
    Buyer
    Post count: 1076

    Can you please check that the code still works? I have tried to use it with another url and it has no effect. Thank you.

    #418647

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Where have u added it?

    #418650

    Joy
    Buyer
    Post count: 1076
    This reply has been marked as private.
    #418750

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I added the following code snippet but commented it out as it does not look like you have added the new form yet.

    
    
    add_filter('sd_details_output_send_buttons','_my_change_contact_link');
    function _my_change_contact_link($content){
     return str_replace('<a href="javascript:void(0);"','<a href="#my_new_link"',$content); 
    }

    Stiofan

    #418817

    Joy
    Buyer
    Post count: 1076

    Thank you so much. I’ve managed to setup the on page target link, but the default form is still loading. Not sure what I’m doing wrong here. This is what I’m using.

    
    
    add_filter('sd_details_output_send_buttons','_my_change_contact_link');
    function _my_change_contact_link($content){
     return str_replace('<a href="javascript:void(0);"','<a href="' . get_the_permalink() . '#form"',$content); 
    }

    Thank you.

    #418919

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    YOu are right, i forgot it was the class that make the popup.
    Also you don’t need to add the whole link in the href if its on the same page

    
    
    add_filter('sd_details_output_send_buttons','_my_change_contact_link');
    function _my_change_contact_link($content){
     return str_replace('"javascript:void(0);" class="b_send_inquiry"','"#form" ',$content); 
    }

    Updated on your site also.

    Stiofan

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

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount