bbPress Topic Thumbnails Prewiew


#1

Hello and thank you for the attention you will dedicate to my question. I just bought the PRO version of rtMedia, it works great and I am very happy with the purchase. The only pity is I can’t see the preview image in the list of topics, as in the case we (me and other users) insert the HTML code of the pictures. Is there any way to solve this problem? I am attaching the image of my forum and I greet you cordially. Marco

my site: www.victimofthecrime.com

Attachment Link(s):

https://rtcamp.com/wp-content/uploads/rtMedia/topics/62201/2014/03/PROVA.jpg


#2

Hi Marco, No there is not any option available in rtMedia-PRO. Following is the code which will help to achieve this. function insert_image_bbp_theme_before_topic_title() { if( class_exists( 'RTMediaModel' ) ) { $context_id = bbp_get_topic_id(); $context = "forum"; $rtmedia_model = new RTMediaModel(); $media_obj = $rtmedia_model -> get( array( 'context' => $context, 'context_id' => $context_id ) ); if( sizeof( $media_obj ) > 0 ) { echo wp_get_attachment_image( $media_obj[0] -> media_id, 'rt_media_thumbnail' ); } } } add_action( 'bbp_theme_before_topic_title', 'insert_image_bbp_theme_before_topic_title');

Use this code in your theme's functions.php file.


#3

WORK!!!! YOU ARE THE BEST OF THE BEST! Thank you! Marco


#4