Property Hive and Layout Builder

Hi

http://dev.rptaylor.co.uk/property/13-common-garden-street-lancaster-la1-1xd/

I am looking at using the layout builder to create certain pages of a property site I am building. Most of the data from the Property Hive plug-in can be retrieved using the dynamic content or dynamic text > post meta feature which is great.

However there a few links that I’m struggling to get working and is probably something that isn’t achievable with the new layout builder.

Example
The property hive plug-in uses this action to launch a contact form on the property you are currently viewing.

Is there a way to add these actions to the layout builder or am I attempting to do something that isn’t possible?


<?php
/**
 * Make enquiry action, plus lightbox form
 *
 * @author      PropertyHive
 * @package     PropertyHive/Templates
 * @version     1.0.0
 */

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

global $post;
?>

<li class="action-make-enquiry">
    
    <a data-fancybox data-src="#makeEnquiry<?php echo $post->ID; ?>" href="javascript:;"><?php _e( 'Make Enquiry', 'propertyhive' ); ?></a>

    <!-- LIGHTBOX FORM -->
    <div id="makeEnquiry<?php echo $post->ID; ?>" style="display:none;">
        
        <h2><?php _e( 'Make Enquiry', 'propertyhive' ); ?></h2>
        
        <p><?php _e( 'Please complete the form below and a member of staff will be in touch shortly.', 'propertyhive' ); ?></p>
        
        <?php propertyhive_enquiry_form(); ?>
        
    </div>
    <!-- END LIGHTBOX FORM -->
    
</li>

Hey @henrybag,

Regretfully, that is not possible. The Dynamic Content can pull in data only and not functions.

For that, you need to ask the Property Hive plugin author to create a shortcode for the feature you want to put in the Layout Builder.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.