Place excerpts with rich HTML (links)
This topic contains 2 replies, has 3 voices, and was last updated by Paolo 8 years, 4 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
November 25, 2016 at 2:47 pm #310910
Hi,
I am using the gd_listings shortcode and am trying to add HTML links to the place excerpts.
Here is the page I am working on: http://amador360-staging.mckmedia.co/amador-winery-map/
I found this code in listings-listview.php but am not sure how to customize it, if possible.
<?php /** * Called before the post excerpt on the listings view template. * * @since 1.0.0 * @param object $post The post object. * @see 'geodir_after_listing_post_excerpt' */ do_action('geodir_before_listing_post_excerpt', $post); ?> <?php echo geodir_show_listing_info('listing'); ?> <div class="geodir-entry-content"> <?php /** * Filter to hide the listing excerpt * * @since 1.5.3 * @param bool $display Display the excerpt or not. Default true. * @param string $view The view type, default 'listview'. * @param object $post The post object. */ $show_listing_excerpt = apply_filters('geodir_show_listing_post_excerpt', true, 'listview', $post); if ($show_listing_excerpt) { if ( isset( $character_count ) && ( $character_count || $character_count == '0' ) ) { $content_out = geodir_max_excerpt( $character_count ); } else { $content_out = get_the_excerpt(); } if ( ! empty( $content_out ) ) { echo "<p>" . $content_out . "</p>"; } } ?></div> <?php /** * Called after the post excerpt on the listings view template. * * @since 1.0.0 * @param object $post The post object. * @see 'geodir_before_listing_post_excerpt' */ do_action('geodir_after_listing_post_excerpt', $post); ?>
Thanks!
November 25, 2016 at 11:28 pm #311184I am not even sure that is possible. But I’ll get the developers to have a look at your question too.
You can always create a URL custom field to add to the Listings display:
https://wpgeodirectory.com/docs/core-place-settings/#url
https://wpgeodirectory.com/docs/core-place-settings/#commonNovember 26, 2016 at 4:27 pm #311804Hi,
the excerpt will always strip html tags. You’d need to replace all the code related to the excerpt with your own functions:
$show_listing_excerpt = apply_filters('geodir_show_listing_post_excerpt', true, 'listview', $post); if ($show_listing_excerpt) { if ( isset( $character_count ) && ( $character_count || $character_count == '0' ) ) { $content_out = geodir_max_excerpt( $character_count ); } else { $content_out = get_the_excerpt(); } if ( ! empty( $content_out ) ) { echo "<p>" . $content_out . "</p>"; } }
This request is considered a customization and goes beyond support.
Thanks
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket