• The plugin is for sure the best out here. It has a wider audience and may be you can add some blank action hooks for display in it?

    Can you add some action hooks to this plugin so this can be more widely used and customised with other wp templates.

    For example:

    <?php
    // wp-property to add in property-search.php
    ?>
    <div class=”<?php wpp_css(‘property_search::s_filter_box’, “wpp_s_filter_box clearfix”); ?>”>

    <?php
    // Adds action before whole set of results
    before_property_listing();
    ?>

    <div class=”clearfix”>
    <?php foreach($wp_properties[‘searchable_attributes’] as $searchable_attribute): ?>

    <?php
    // Adds action before every individual result
    before_single_property_listing();
    ?>

    <div class=”wpp_s_filter_container”>
    <p>
    <label for=”<?php echo $searchable_attribute; ?>_result”><?php echo $wp_properties[‘property_stats’][$searchable_attribute]; ?>:</label>
    <input type=”text” id=”<?php echo $searchable_attribute; ?>_result” style=”border:0; color:#f6931f; font-weight:bold; width: 155px;” />
    </p>
    <div id=”<?php echo $searchable_attribute; ?>_slider”></div>
    </div>

    <?php
    // Adds action after every individual result
    after_single_property_listing();
    ?>

    <?php endforeach; ?>
    </div>

    <?php
    // Adds action after whole set of results
    after_property_listing();
    ?>

    </div>

    <?php
    // END OF FILE
    ?>

    <?php
    // wp-property to add in property.php
    ?>
    <div id=”container” class=”<?php wpp_css(‘property::container’, array((!empty($post->property_type) ? $post->property_type . “_container” : “”))); ?>”>

    <?php
    // Adds action before individual property content
    before_property_single_content();
    ?>

    <div id=”content” class=”<?php wpp_css(‘property::content’, “property_content”); ?>” role=”main”>
    <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>

    <div class=”<?php wpp_css(‘property::title’, “building_title_wrapper”); ?>”>
    <h1 class=”property-title entry-title”><?php the_title(); ?></h1>

    <h3 class=”entry-subtitle”><?php the_tagline(); ?></h3>
    </div>

    <div class=”<?php wpp_css(‘property::entry_content’, “entry-content”); ?>”>
    <div class=”<?php wpp_css(‘property::the_content’, “wpp_the_content”); ?>”><?php @the_content(); ?></div>

    <?php if ( empty($wp_properties[‘property_groups’]) || $wp_properties[‘configuration’][‘property_overview’][‘sort_stats_by_groups’] != ‘true’ ) : ?>
    <ul id=”property_stats” class=”<?php wpp_css(‘property::property_stats’, “property_stats overview_stats list”); ?>”>
    <?php @draw_stats(“display=list&make_link=true”); ?>

    <?php else: ?>
    <?php @draw_stats(“display=list&make_link=true”); ?>
    <?php endif; ?>

    <?php if(!empty($wp_properties[‘taxonomies’])) foreach($wp_properties[‘taxonomies’] as $tax_slug => $tax_data): ?>
    <?php if(get_features(“type={$tax_slug}&format=count”)): ?>
    <div class=”<?php echo $tax_slug; ?>_list”>
    <h2><?php echo $tax_data[‘label’]; ?></h2>
    <ul class=”clearfix”>
    <?php get_features(“type={$tax_slug}&format=list&links=true”); ?>

    </div>
    <?php endif; ?>
    <?php endforeach; ?>

    <?php if(is_array($wp_properties[‘property_meta’])): ?>
    <?php foreach($wp_properties[‘property_meta’] as $meta_slug => $meta_title):
    if(empty($post->$meta_slug) || $meta_slug == ‘tagline’)
    continue;
    ?>
    <h2><?php echo $meta_title; ?></h2>
    <p><?php echo do_shortcode(html_entity_decode($post->$meta_slug)); ?></p>
    <?php endforeach; ?>
    <?php endif; ?>

    <?php if(WPP_F::get_coordinates()): ?>
    <div id=”property_map” class=”<?php wpp_css(‘property::property_map’); ?>” style=”width:100%; height:450px”></div>
    <?php endif; ?>

    <?php if($post->post_parent): ?>
    parent_link; ?>” class=”<?php wpp_css(‘btn’, “btn btn-return”); ?>”><?php _e(‘Return to building page.’,’wpp’) ?>
    <?php endif; ?>

    </div><!– .entry-content –>

    <?php
    // Adds action before property comments
    before_property_comments();
    ?>

    <?php comments_template(); ?>

    <?php
    // Adds action after property comments
    after_property_comments();

    // Adds action before property single post ends
    before_property_single_post_end();
    ?>

    </div><!– #post-## –>

    </div><!– #content –>
    <?php
    // Adds action after individual property content
    after_property_single_content();
    ?>
    </div><!– #container –>

    <?php
    // END OF FILE
    ?>

    <?php
    // wp-property to add in action_hooks.php or template-functions.php etc.
    function after_property_listing() {
    do_action(‘after_property_listing’);
    }
    // END OF FILE
    ?>

    <?php
    // we can then write this in our theme’s functions.php

    add_action(‘my_function’,’after_property_listing’)
    function my_function() {
    //stuff
    }
    // END OF FILE

    https://ww.wp.xz.cn/plugins/wp-property/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding Action Hooks for theme tabs’ is closed to new replies.