XF 2.1 Need help configuring widget for latest posts with prefix

vmgkartik

Member
I am trying to configure a widget that only displays the latest posts with a specific prefix. The prefix ID I am using is 2.

Screenshot 2024-12-04 at 3.08.59 PM.webp

However, despite my setup, the widget shows the latest posts without filtering for those with prefix ID 2.

Could anyone please help me write the Display Condition correctly to achieve this?

Thank you!
 
But I'm not sure if the condition applies in this case, try it and you'll see. Otherwise, it will be necessary to create a search forum (option not to display it in the list of forums) and then use a "Search forum" widget.
 
Thank you for your response.

I attempted using $xf.prefix_id == '2', but it doesn't seem to work for me.

Could you clarify what you mean by "... create a search forum (with the option not to display it in the list of forums)..."? How do I create this 'search forum' widget?

Additionally, I found a resource https://xenforo.com/community/resources/dl6-widget-new-threads-and-posts-with-prefix-limit.5587/ that seems to be working for now. This helps me display the latest posts with a specific prefix. However, I would prefer to have the condition functioning properly, if possible, and to utilise the default XF functionality to achieve this.
 
Could you clarify what you mean by "... create a search forum (with the option not to display it in the list of forums)..."? How do I create this 'search forum' widget?
 
The display condition does not affect widget content - it only affects how the widget is displayed, e.g. to a specific user group, logged in only, etc.

It is not possible to filter the default widget content in that manner - use a search forum as explained.
 
How do I create this 'search forum' widget?
 
Back
Top Bottom