• Resolved wealthy

    (@wealthy)


    Currently when I go to a loisting, and I click on someones website URL, it opens in the same tab.
    Is there a way to allow it to open in a new tab? So my site stays opne on the current tab

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Mahfuzul Alam

    (@mahfuz87)

    Hi @wealthy

    Thank you for reaching out.

    Please implement the following custom code in the functions.php file of the currently activated theme folder or you can install any code snippet plugin and create a code snippet with this code.

    add_action( 'wp_footer', function(){
    ?>
    <script type="text/javascript">
    jQuery(document).ready(function($){
    $('.directorist-listing-single a').attr('target', '_blank');
    });
    </script>
    <?php
    } );

    I believe this will solve the problem. Please let me know if you need further assistance.

    Kind regards,

    Thread Starter wealthy

    (@wealthy)

    There are two feilds that show the web address
    One in in the Author Info
    it is this one that doesn NOT open in a new tab.

    The other one in the Contact / Business Information does open in a new tab

    So putting in that code didnt change it

    are both those feilds pulled from the same bit of info put in by the person entering the data in their listing??

    Plugin Support Mahfuzul Alam

    (@mahfuz87)

    Hello @wealthy

    Thank you for your response.
    Could you please provide the URL of the page where you are expecting the changes? I’ll do my best to provide a solution for you.

    Regards

    Thread Starter wealthy

    (@wealthy)

    The website is listed on every persons Listing under /all-listings/
    and then on their individual listing



    • This reply was modified 1 month ago by wealthy.
    Plugin Support Mahfuzul Alam

    (@mahfuz87)

    Hello

    Please use the following code. I think this will solve the problem –

    add_action( 'wp_footer', function(){
    ?>
    <script type="text/javascript">
    jQuery(document).ready(function($){
    $('.directorist-single-author-info a').attr('target', '_blank');
    });
    </script>
    <?php
    } );

    Please let me know the update.

    Kind regards,

    Thread Starter wealthy

    (@wealthy)

    Yes that worked.
    thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.