Skip Navigation

[Resolved] costume search

This support ticket is created 6 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 28 replies, has 2 voices.

Last updated by shannonW 6 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#920726

For q2) , please try this:
Dashboard-> Toolset-> WordPress Archives, edit the item "character- archive"
In section "Search and Pagination", you are display the view shortcode [wpv-view name="search_ch"] insider the search form, it conducts the problem, I suggest you move the view shortcode outsider the search form, for example:
Replace it from:

[wpv-filter-start hide="false"]
<div class="search">
	 [wpv-view name="search_ch"]
</div>
...

To:

<div class="search">
	 [wpv-view name="search_ch"]
</div>
[wpv-filter-start hide="false"]
...

And test again

#920982

um... nothing change... I tried but still, the page looks same...

#921064
warrior.JPG

I have tested your duplicator package with only Toolset plugins + WordPress default theme 2017, it works fine, see screenshot warrior.JPG

There is only one item in the search result, there isn't similar problem as you mentioned above:
when I type category to call, Warrior, it shows everything.
https://toolset.com/forums/topic/costume-search/#post-919448

So it should be a compatibility problem or server problem, if you need more assistance, please provide a test site with the same problem, I need to test and debug it in a live website. thanks

#921506

Thanks for the details, I can login your website, but it is not an admin account, so I can not check the views settings, please make sure it is a valid administrator account, and I need your permission to disable plugins and switch theme.

Then update this thread when your website is ready for debug.

#921814

oops, I am sorry I change the role.

#922289

Thanks for the details:
1) In the URL, I don't see the "search bar"
hidden link
So I edit the wardpress archive
hidden link
And have added a search box:
[wpv-filter-search-box output="bootstrap"]
with filter:
Filter post title, content and fields by a text search that will be added manually using the shortcode [wpv-filter-search-box].

2) Test it in front-end hidden link, input "warrior" in the search bar and search, I see four results, I assume this is the problem you mentioned above Q2), see it here:
hidden link
Can you confirm it?

3) To debug this problem, I have edit the post type "Character posts", and enable option "Custom Fields"
hidden link

open each them of the result, for example
hidden link
search keyword "warrior"
You can find two "warrior" results in section "Custom fields", field "wpcf-dev-tip"
Same as this one:
hidden link

If you don't need the "wpcf-dev-tip" custom field, you can edit each post and remove it

#922647
bug02.jpg
bug01.jpg

I don't know what you have done... The list of characters is still there.
When you see bug01.jpg, the input box does not relate to the search box. It's okay to leave input there but the problem is it does not show the right image. (see image bug02.jpg)

01. I asked to remove the list of character
the problem was when I insert the search bar in the archive page it shows the list of character on the right side ( see image 'bug01.jpg)

02. I asked to how to show the right image when I type the keywords
It keeps showing the wrong image ( bug02.jpg)

03. Then once you solve those, I want to know how to make the search bar as a global search bar.

#922831
warrior.PNG

OK, lets handles the question one by one:

01. I asked to remove the list of character

The question is not clear.

If you want to remove "list of character", you will need to edit wordpress archive:
hidden link
in section "Search and Pagination", and remove the view's shortcode:
[wpv-view name="search_ch"]
see your own screenshot:
hidden link

If you want to display the "list of character", you will need customize your CSS codes here:
hidden link
section "Search and Pagination", click "CSS editor", you will find the CSS codes:

.search{
width: 200px;
    position: absolute;
    right: 0;
}

It is your CSS codes display it in the right

02. I asked to how to show the right image when I type the keywords

Here are the detail steps:
Open below URL:
hidden link
You should be able to see 4 items in the search result of keyword "warrior", the problem is all 4 posts are setup custom field value with keyword "warrior", for example this one:
hidden link
in section "Custom Fields", field "wpcf-dev-tip", the field value is using text "warrior", see screenshot: warrior.JPG
If you don't want this post to be displayed in the search result, you will need to remove text "warrior" in custom field "wpcf-dev-tip".

03. Then once you solve those, I want to know how to make the search bar as a global search bar.

This needs custom codes, the option "Only the search form" is only available for normal post view, it isn't available for wordpress archive, for example, you can create a page, click button "Fields and Views", find post view "test-search05", you will see the option "Only the search form", see screenshot search-form.JPG

More help:
https://toolset.com/documentation/user-guides/front-page-filters/#displaying-custom-search

#924263
error02.jpg
error01.jpg

Now I understand that is happening there. Thank you for helping.

but I still need help...
01. I delete the keyword "Assassin" inside of the custom field value but some post even though I delete it keeps showing on the page. ( attachment image: error01.jpg)

02. My another question is can I make the search bar only recognize by title and categories?
For example currently, if the content has 'warrior' word, it shows in the list page ( attachment image: error02.jpg)

#924314
q03.jpg

oh and I have an extra question... (this is the second questions, first one is on top of this post)
is it possible to show the category name and a total number of total post? so once a user clicks Warrior category on the tab it shows Warrior text and Totals on top of the feature images. (attachment image: q03.jpg)

#924604
test-assassin.PNG

Q1) I delete the keyword "Assassin" ...

There is a hidden field "_wp_old_slug" in the post "Edward the Great", value is "test-assassin", you will be able to dig it out with mysql tools, for example, PHPmyadmin, run below SQL in your database:
SELECT * FROM `wp_postmeta` WHERE `post_id` = 5001 AND `meta_value` LIKE '%Assassin%'
See screenshot test-assassin.PNG

Q2) My another question is can I make the search bar only recognize by title and categories?

It is a setting of Relevanssi plugin, you can try this:
Dashboard-> Settings-> Relevanssi-> Indexing
option "Custom fields", choose "None", and build the index, and test again

Q3) is it possible to show the category name and a total number of total post?

When you click the Warrior category on the tab, it will pass an URL parameter "wpv-character_class_cat", the value is "warrior", so you can get the URL parameter's value with shortcode :
[wpv-search-term param="wpv-character_class_cat"]
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-search-term

You can display the total post count with shortcode [wpv-found-count]:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-found-count

#924881
q06.jpg
q05.jpg
q04.jpg

Thank you for keep helping me. I have three more issues...

Q1. When I click tab the result is not showing unless I click the reset button.
Is there any way I can see the result without click reset button? (q04.jpg)

Q2: Once I click the tab and type word in the input. The result is not showing. (q05.jpg)

Q3: when I click the tab it shows the word on top of the list, but when I type the word in the input box, it does not show the word on top. (q06.jpg)

New threads created by Luo Yang and linked to this one are listed below:

https://toolset.com/forums/topic/split-costume-search/

#948005

I assume the original questions of this thread have been resolved, fFor the new questions. please create new threads for each new question, and I have splitted one new ticket for you, you can check it here:
https://toolset.com/forums/topic/split-costume-search/

#949255

Thank you!!