WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. DannyCare
    Member
    Posted 1 year 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?

    Thanks

    http://wordpress.org/extend/plugins/business-directory-plugin/

  2. DannyCare
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year ago #

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

  4. atrixdave
    Member
    Posted 1 year 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!

    Dave

  5. businessdirectoryplugin
    Member
    Plugin Author

    Posted 1 year 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

About this Topic