Notifications
Clear all

wpForo 1.x.x [Closed] How to do 'posts in last 24 hours' search and return results without search input fields/forms?

6 Posts
2 Users
3 Reactions
2,733 Views
Posts: 111
Topic starter
(@nando4)
Estimable Member
Joined: 8 years ago

I have a sidebar widget that searches and then shows forum posts within the last 24 hours.

To maximize screen real estate, I'd like to remove all the search input fields/forms it shows so can show the search results instead. Those input fields are not necessary since we know our search parameters.

Can it be done easily? If so, how?

 

 

5 Replies
Robert
Posts: 10591
Admin
(@robert)
Support Team
Joined: 9 years ago

There is no option to remove them, the only way is CSS. Use this CSS:

#wpforo #wpforo-wrap .wpforo-search-wrap .wpf-search-bar .wpforo-tr:first-child .wpforo-td{display:none;}

Or this:

#wpforo #wpforo-wrap .wpforo-search-wrap .wpf-search-bar .wpforo-tr:first-child .wpforo-td{display:none;}
#wpforo #wpforo-wrap .wpforo-search-wrap .wpf-search-bar .wpfrtd {border-bottom: 1px dotted #ffffff;display: none;} 
#wpforo #wpforo-wrap .wpforo-search-wrap .wpf-search-bar .wpforo-td .wpfs{width:50%; background:#fff;}
Posts: 111
Topic starter
(@nando4)
Estimable Member
Joined: 8 years ago

Thank you for the reply. I confirm those CSS changes do the job but they also mean any searches where a user clicks "?" and wants to search specifics are then missing those input fields.

Is there anyway I can bind that CSS code to apply only to my 'posts in last 24 hours' search?

Robert
Posts: 10591
Admin
(@robert)
Support Team
Joined: 9 years ago

I'm sorry but there is no way.

Posts: 111
Topic starter
(@nando4)
Estimable Member
Joined: 8 years ago

Alright then. How about is there an anchor I can place as the search URL's end (eg:[search]#results) so that the page focus is on the search results, skipping the input fields?

Page 1 / 2