1. Docs
  2. Developer Guide
  3. Displaying a Link to Lettings Fees

Displaying a Link to Lettings Fees

To display lettings fees you'll need to override your single-property/price.php template and add the link accordingly. In the example below we're opening the fees in a lightbox but you could also link to a separate page.

Step 1 - Override single-property/price.php

You'll need to override this template so as to not lose your changes when you update in the future. You'll need to copy:

/wp-content/plugins/propertyhive/templates/single-property/price.php

To:

/wp-content/themes/{your-theme-name}/propertyhive/single-property/price.php

Step 2 - Add lettings fees link

Within this price.php template then add the following where you would like the link to appear:

if ($property->department == 'residential-lettings')
{
    echo ' <span class="fees-apply-link"><a data-fancybox data-src="#lettings_fees_lightbox" href="javascript:;">' . __('Fees Apply', 'propertyhive') . '</a></span>';

    echo '<div id="lettings_fees_lightbox" style="display:none; max-width:400px">
        <h2>' . __('Fees Apply', 'propertyhive') . '</h2>
        ' . nl2br(get_option('propertyhive_lettings_fees')) . '
    </div>';
}
Was this article helpful to you? Yes No