Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Estatik

    (@estatik)

    Hello strandcreative,

    It can be arranged via changing the code of the plugin – file – es_my_listing.php, get_list() function.
    You can do it yourself or contact us and we will do it on custom basis.

    Thanks

    Thread Starter strandcreative

    (@strandcreative)

    Thanks – we managed to do this!
    Is there also a way of showing the period next to the price? Is it the same file – es_my_listing.php, get_list() function?

    Currently it just shows the price so for rental properties so it says $450 when we would like to show $450 per month?

    Thanks

    Hi strandcreative,
    You are right, to add the period next to the price you should make changes to the file you mentioned – es_my_listing.php, get_list() function
    Thanks

    Thread Starter strandcreative

    (@strandcreative)

    Hi, I couldn’t get this to work like the excerpt

    I added to the top of the plugin file – “es_listing_functions.php” the following:

    <?php
    
    $es_settings = es_front_settings();
    
    $upload_dir = wp_upload_dir();
    
    ob_start();
    
    global $wpdb;
    
    $sql = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}estatik_properties WHERE prop_id = '%d' ORDER BY prop_id desc", get_the_id());
    
    $es_prop_single = $wpdb->get_row($sql);
    
    $prop_rent = $wpdb->get_row( "SELECT period_title FROM {$wpdb->prefix}estatik_manager_rent_period WHERE period_id = '{$es_prop_single->prop_period}'");

    and then to output the data I used:

    <span><?php echo $prop_rent->period_title?></span>

    But it is empty. The site in question can be seen here: https://www.vpropertymanagement.co.uk/search-properties/

    Re:above file edit. I didn’t edit file – es_my_listing.php to get the excerpt to show on all property pages. I edited file – “es_listing_functions.php”

    Hi!

    We tried to perform the sequence of actions you have described and were successful in adding the functionality you need.
    Please, try to check the server error log – may be there are some messages of mistakes.
    Or try also to output var_dump($prop_rent)

    Thank you!

    Thread Starter strandcreative

    (@strandcreative)

    Thanks.

    Did you try this in the “es_listing_functions.php” file?
    When we try…

    <?php var_dump($prop_rent->period_title); ?> or
    <?php var_dump($prop_rent); ?>

    Both return NULL. Nothing in the error log too.

    Hi!
    Please, clarify in what function have you tried this?
    As the “es_listing_functions.php” file has many functions for different listings.
    Thanks!

    Thread Starter strandcreative

    (@strandcreative)

    I have placed

    <?php
    
    $es_settings = es_front_settings();
    
    $upload_dir = wp_upload_dir();
    
    ob_start();
    
    global $wpdb;
    
    $sql = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}estatik_properties WHERE prop_id = '%d' ORDER BY prop_id desc", get_the_id());
    
    $es_prop_single = $wpdb->get_row($sql);
    
    $prop_rent = $wpdb->get_row( "SELECT period_title FROM {$wpdb->prefix}estatik_manager_rent_period WHERE period_id = '{$es_prop_single->prop_period}'");

    and then in the “function list_property($list)” i added:

    <?php var_dump($prop_rent->period_title); ?> or
    <?php var_dump($prop_rent); ?>

    next to the line:

    <?php echo get_price($list->prop_price); ?>

    In this case try to do that in the function get_list(), in a loop use $list->prop_id instead of get_the_id() .
    If this won’t work, try to do all the actions in es_prop_single.php file
    Thanks!

    Thread Starter strandcreative

    (@strandcreative)

    excellent ??

    use $list->prop_id instead of get_the_id() worked

    Thank you very much

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Show description with [es_my_listing] shortcode?’ is closed to new replies.