Notifications
Clear all

[Solved] Search box not showing on single post

9 Posts
2 Users
1 Reactions
919 Views
Posts: 12
Customer
Topic starter
(@aaron-mckeon)
Member
Joined: 3 years ago

I have installed and activated the search add-on but no search box is appearing on single posts.  The comment form displays properly but no search form.  Does the shortcode need to be added into the single post template?  I thought the shortcode was only for a general site-wide search widget.

I'm not finding anything in the documentation or settings that would be causing the search box not to be appearing.  Any help would be appreciated.

No Search Box Appears

 

8 Replies
Astghik
Posts: 6193
Admin
(@astgh)
Illustrious Member
Joined: 7 years ago

Hi Aaron McKeon,

Does the shortcode need to be added into the single post template?

The shortcode isn't necessary. 

We'll need at least an example URL to check the issue. 

7 Replies
Customer
(@aaron-mckeon)
Joined: 3 years ago

Member
Posts: 12

@astgh Below please find an example URL from our staging environment where we're testing the plugin:

https://peakprosperitycom.bigscoots-staging.com/fed-raises-rates-25-bp-the-safety-system-works/

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6193

@aaron-mckeon,

Please send the admin login details to info[at]gvectors.com email address. Unfortunately, we were not able to find any reason yet. 

Customer
(@aaron-mckeon)
Joined: 3 years ago

Member
Posts: 12

@astgh Sent!  Thanks.

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6193

@aaron-mckeon,

Somehow the comment count is not saved correctly in the wp_post table. Please watch this video: https://www.screencast.com/t/dXTyQ5Pzwu

In short, if the comment count is 0, the search box isn't showing. As you see if the comment count is equal to or greater than 1 it's showing fine. Here you can see the comment count is 3 and the search box is showing fine: https://peakprosperitycom.bigscoots-staging.com/beta-testers-start-here/

Use the SQL code to update the comment count: 

UPDATE wp_posts p set p.comment_count = (SELECT COUNT(*) FROM wp_comments c WHERE c.comment_post_ID = p.ID AND c.comment_approved = 1)

The red-marked wp_ is just a prefix. In your case, it can differ. 

Customer
(@aaron-mckeon)
Joined: 3 years ago

Member
Posts: 12

@astgh Awesome, thanks.  I ran the SQL and it's updated in the database but not showing on the front-end.  Is there some caching in wpDiscuz that needs to be reset?

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6193

@aaron-mckeon

Try to delete all kinds of caches before checking. 

Customer
(@aaron-mckeon)
Joined: 3 years ago

Member
Posts: 12

I was able to determine this was being caused by a plugin conflict.  We have since fixed the issue.  Thanks for assisting.

Share:
Scroll to top