Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

Script Small preview of the tipic widget

5 Posts
2 Users
3 Reactions
624 Views
xfok
Posts: 86
 xfok
Topic starter
(@xfok)
Estimable Member
Joined: 6 years ago

I would like to add a small preview of the tipic in the Recent Topics widget as it is already present for the Recent Posts widget.
Is it possible to do this? Any suggestions on a custom code?

4 Replies
Tutrix
Posts: 1522
(@tutrix)
Noble Member
Joined: 5 years ago

Hi @xfok 

Posted by: @xfok

Any suggestions on a custom code?

try

<p class="posttext"><span><?php $first_post_body = wpforo_post($topic['first_postid'], 'body');  wpforo_text($first_post_body, 150);  ?></span></p>

Replace 150 with the value you want to display.

 

Reply
1 Reply
xfok
 xfok
(@xfok)
Joined: 6 years ago

Estimable Member
Posts: 86

Posted by: @tutrix

Hi @xfok 

Posted by: @xfok

Any suggestions on a custom code?

try

<p class="posttext"><span><?php $first_post_body = wpforo_post($topic['first_postid'], 'body');  wpforo_text($first_post_body, 150);  ?></span></p>

Replace 150 with the value you want to display.

 

 

@tutrix thank you very much. Is this code also able to return advanced attachments like images?

 

Reply
Tutrix
Posts: 1522
(@tutrix)
Noble Member
Joined: 5 years ago

Posted by: @xfok

Is this code also able to return advanced attachments like images?

I don't have a solution for this yet.

wpforo_text

Displays only text, no HTML, the code can be changed, but attachments will only be displayed as shortcode.

Example

[ attach ]100[/ attach ]

 

Reply
1 Reply
xfok
 xfok
(@xfok)
Joined: 6 years ago

Estimable Member
Posts: 86

Posted by: @tutrix

Posted by: @xfok

Is this code also able to return advanced attachments like images?

I don't have a solution for this yet.

wpforo_text

Displays only text, no HTML, the code can be changed, but attachments will only be displayed as shortcode.

Example

[ attach ]100[/ attach ]

 

Having a forum where many images are posted so it is not a good solution.
Is it difficult to implement a solution that returns the shortcode as an image?

 

Reply