Business Directory Plugin
[resolved] Open Listing URL in New Window/Tab (5 posts)

  1. DannyCare
    Posted 4 years ago #

    Hi there I love this plugin, it's perfect for what I need and when I am done developing my site, I'd be honoured to be showcased on this site.

    For the moment though I'm struggling trying to find a way to open all of my listing URL's in a new window or tab. I can work my way around PHP, so what can I do to achieve this?



  2. DannyCare
    Posted 4 years ago #

    After a little bit of digging, I've found the code to modify - It does mean changing the core files so be sure to make a backup before you update the plugin to a newer version.

    Connect to your FTP, find the plugin directory (should be business-directory-plugin)

    Open api.php

    In the file, search for "URLValidator" - You'll see a HTML tag, simply add onto the end of the opening tag target="_blank"

    Here's an example of how mine is set up:

    <a class="listing-url" href="%s" rel="follow" target="_blank">Visit Website</a>

  3. businessdirectoryplugin
    Plugin Author

    Posted 4 years ago #

    Thanks for that Danny. We have this on the list for things to address in an upcoming release.

  4. atrixdave
    Posted 3 years ago #

    Hi guys,

    Has this been added to the plugin? I don't see the option anywhere, maybe I'm missing it?

    I also can't find "URLValidator" in the api.php file to make this change.

    I need the URLs in my directory to open in a new window.

    Thanks for your help!


  5. businessdirectoryplugin
    Plugin Author

    Posted 3 years ago #

    Yes, it's in 3.0.2, look under the field configuration for an URL field (Edit link on Manage Form Fields)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Business Directory Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic