Free Directory, Listing & Classifieds WordPress Plugin Support General HivePress Make links in Listings open in a new tab / window

Make links in Listings open in a new tab / window

  • Author
  • martin


    Is there a way to make the URL / links in the Listings open in a new tab? Right now it opens in the same window and takes my visitors away from my site.





    If you mean all links in the listing description, it’s possible but requires some customizations. If you’re familiar with PHP you can start with overriding the listing description template part

    Hi Martin.
    I have solved this issue putting a decorator on atribute display format.
    I have used web linked fields as text field, them use formar as (for url field)
    <a href="http://%value%" target="_blank" rel="noopener noreferrer"><img src="./wp-content/uploads/2020/06/web-ico.png" width="32px" /> %value%</a>
    On this case I apllied a blank window link and an image (i have uploaded do WordPress).
    On WhatsApp field:
    <a href="" target="_blank" rel="noopener noreferrer"><img src="./wp-content/uploads/2020/06/whatsapp-ico.png" width="32px" /> %value%</a>
    You can see the result on my listing site:
    All web links open a new window.

    but where do I put all this?


    You can add these codes to the attribute display format, but this will open links in a new tab for the attributes only, links in the listing description will still open in the same tab.

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

You must be logged in to reply to this topic.


Sign In

Don't have an account? Register

Forgot password?


Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.