Notifications
Clear all

How to modify the Recent Posts widget? Go to unread vs most recent.

8 Posts
3 Users
0 Reactions
230 Views
Posts: 138
Topic starter
(@cotner)
Estimable Member
Joined: 3 years ago

I like how the Recent Posts widget works. It is clean and shows the most recent post and topic, but it also let's users know that there is new posts in a particular topic they are interested in.

Right now, if a user clicks the link it will bring them to the most current post. But I am getting request after request to have it link to the first UNREAD post in that topic instead. This way they know where they left off.

Yes the /forum/recent/ page does what people want, but they love the small widget that can be used on any location/page on the site.

I know a tiny bit about that kind of coding, but not enough to make this kind of change. Is it even possible? If I had the correct code, could I put a modified /widgets/RecentPosts.php file in my theme folder to make this work without modifying the original file?

I have made layout tweaks in the past by putting files in my theme folder. Like child_theme/wpforo/layouts/2 and whatnot. Is this doable for this particular widget? If so, what code modifications do I need?


7 Replies
Posts: 1229
(@percysgrowroom)
Noble Member
Joined: 7 years ago

You shouldn't need to code it, the option t jump to first unread is in there some where, I am just not sure of the location lol. 


Reply
Posts: 138
Topic starter
(@cotner)
Estimable Member
Joined: 3 years ago

There is a way for the list to only display the unread topics, but the destination link it still going to the most recent post and not the first unread post.

BTW... These "Legacy" widgets are a pain. Need to get these old things updated to a Gutenberg Block.


Reply
Posts: 138
Topic starter
(@cotner)
Estimable Member
Joined: 3 years ago

Any advise since there is no option to change the link URL to first unread within the Recent Posts widget?


Reply
3 Replies
Robert
Admin
(@robert)
Joined: 10 years ago

Support Team
Posts: 10602

@cotner,

I don't think this is a general issue. It could be a topic-specific issue caused by cache plugins or browser cookies, since browser cookies are also used for detecting the first unread post. Additionally, this feature only works if you're logged in. There are therefore many possible reasons for this issue. We do not see this problem on our test sites, so we cannot address it at this time.


Reply
(@cotner)
Joined: 3 years ago

Estimable Member
Posts: 138

@Robert I am on desktop right now and I literally clicked a thread in the recent posts widget right next to me on this very page. It brought my to the most recent post of a thread I have never read before, it did NOT bring me to the first unread post. If I had never been in that thread before, and if it truly was supposed to bring me to the first unread post, it should have taken me to the very first post of that thread.


Reply
Robert
Admin
(@robert)
Joined: 10 years ago

Support Team
Posts: 10602

@cotner,

I'm sorry but we cannot provide any quick solution. I'll add this in our issue list for further investigation.


Reply
Posts: 138
Topic starter
(@cotner)
Estimable Member
Joined: 3 years ago

Dang... I was really hoping there was something I could do on my end by tweaking and/or adding code. I think I am really wanting bits from both the RecentTopics.php and RecentPosts.php widget to display what I am looking for.

Recent Topics has the link to first unread built in, but will not show the most recent comment. I am also not fond of it showing the topic creator and when it was created. Especially when a topic could be 5 years old. The Recent Post widget shows all the info I want, but will not link to the first unread post. I currently use the [wpforo item="recent"] shortcode, but using it entails a lot of hiding unwanted content within the CSS and with the behavior of jumping down the page to the most recent post even if there is content above it. A problem I describe earlier this year in THIS THREAD. So I have been investigating any option I may have to get the dates and behavior  that I am wanting. But no success.

 

Has there been any thoughts of moving away from the Legacy Widgets for wpForo? The legacy widgets are getting more and more difficult to use along side of the newer Gutenburg Blocks. This I not just wpForo, there are still a tons of plugins that still use them and it gets harder and harder to work with them. I have noticed there are times when I save a wpForo widget and those changes do not actually save. Sometimes I have to go in to the backend and change the value in order to get something to save. So I just think that these Legacy Widgets are running out of time fast on Wordpress.

 

 


Reply