Notifications
Clear all

wpForo 1.x.x [Solved] Recent Posts Widget and Recent Topics Widget automatically aligns on center if topic has 50 characters or more

2 Posts
1 Users
1 Likes
849 Views
Posts: 281
Topic starter
(@crisw)
Reputable Member
Joined: 6 years ago

Hi wpForo Team,

I tried to resolve this issue, but I can't seem to do it (without breaking anything else on my clients' site).  Maybe it's time to ask for your help on this. 🙂

Below are the details of the Issue I am having on our client forums:

ISSUE: Recent Posts Widget and Recent Topics Widget automatically aligns on center if topic has 50 characters or more

DEVICES: On Desktop View and Mobile view, the Topic title automatically aligns to the center of the widget (please see screenshot), if the length of the topic title is about 55 characters or longer.

On Tablet View, it's okay and stays left aligned.

BROWSER: I tested this on Chrome and IE. Our forum uses long topic titles, but it seems to look broken on the Recent Posts and Recent Topics Widget areas, on Desktop View and on Mobile Phone View.

WPFORO VERSION: Version 1.7.2

SCREENSHOTS: Attached.

 

I also tried the code below and it seems to still not work on the alignment, which should be on the left.

 

#wpf-widget-recent-replies.wpforo-widget-wrap .wpforo-widget-content {
text-align: left !important;
}
#wpf-widget-recent-replies .widget-title {
text-align: left !important;
}

div.wpforo-right-sidebar {
text-align: left !important;
}

 

As a workaround, I have temporarily "centered" the sidebar, so our clients' forum doesn't look broken, with some posts on the left, and those with long topics, that become auto-centered.

I'd much rather use the wpForo widget design which aligns everything on the widget area on the left.  

Any help or tips would be greatly appreciated. Thank you! 🙂 

 

Topic Tags
1 Reply
Posts: 281
Topic starter
(@crisw)
Reputable Member
Joined: 6 years ago

Hi wpForo Team,

Update:  After testing this out (and splitting hairs 🤣  ), the automatic centering of the Forum widgets for topics that seem to happen when the topic has more than 50 characters, is most probably getting triggered by something in our WP theme, or the other plugins developed by other developers. (To rule this out, I quickly switched WP themes, and saw the difference).  

So the problem was with our WP Theme, and not wpForo.  🙂 

Since we wanted to still use our WP Theme, I just decided to write some code snippets to center the "Recent Posts" and "Recent Topics" widgets, since I cannot predict if forum members would be writing topics that are more than 50 characters.  Things look more "uniform" now.  🙂 

I am marking this post as solved, for our own use case.  🙂   

 

I'll share the notated snippets here, in case someone sees a similar issue.   

I added it to the 

Forum Dashboard > Settings> Styles > Custom CSS Code

 

/*For Recent Replies Widget Title*/
#wpf-widget-recent-replies .widget-title {
text-align: center !important;
}


/*For Recent Replies Widget Content*/
#wpf-widget-recent-replies.wpforo-widget-wrap .wpforo-widget-content {
text-align: center !important;
}

/*For Widget Title*/
h3.widget-title {
text-align: center !important;
}

/*For Widget Content, like for example Search Box widget*/
div.wpforo-widget-content {
text-align: center !important;
}

I guess we can mark this topic as solved and can close the topic.  Sorry for the trouble.  🙂