WordPress.org

Ready to get started?Download WordPress

Forums

  1. futurecar
    Member
    Posted 11 months ago #

    Is there a way to put an excerpt of the description on the property overview page? I know that I can create an extra field in the developer tab and include something like:
    <?php if($property['other']): ?><?php echo $property['other']; ?><?php endif; ?>

    on my page. However I would like to have code that simply grabs some of the description from the tinymce editor on the add property page.

    This is mainly because I don't want to have information twice. I know exactly where I need to go in regards to implementing this on the property overview template.

    http://wordpress.org/plugins/wp-property/

  2. futurecar
    Member
    Posted 11 months ago #

    Specifically, add I want a description excerpt for each of my search results.

  3. futurecar
    Member
    Posted 11 months ago #

    resolved.

  4. wilsarbali
    Member
    Posted 10 months ago #

    hi, futurecar.. i have same problem. I would like to show the property excerpt on the hotel listing. I've use this code [property_overview per_page=5] in my page.. unfortunately, it only show the property title and price. May i know your idea how to show the property excerpt? and it's will very helpful for me if you can give me the example.

    thank you very much :)

  5. futurecar
    Member
    Posted 10 months ago #

    The code you're using is simply the shortcode to display the wpproperty content. If you want to add an excerpt, you'll need to edit code on the actual page (located in the templates folder).

    In particular the following code is what I used on the property-overview.php page.

    <?php if($property['post_content']): ?><?php echo substr(strip_tags(preg_replace('/\[.*?\]/', '', $property['post_content'])), 0, 365); ?><a <?php echo $in_new_window; ?> href="<?php echo $property['permalink']; ?>"> [...]</a><?php endif; ?>

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.