Hi, I have created a new site with some content filters and took many issues with them:
My site - hidden link
Examples:
1) Archive for type "Providers" (провайдеры) - hidden link
It has 10 items. All items have a custom field "Mobile-ready" with values Yes/No (Есть/Нет) - hidden link
If I choose Yes(Есть) I get 7 filtered items - hidden link
If I choose No(Нет) I get 2 filtered items - hidden link
7 + 2 = 9, but I have 10! One item is not filtered. It is the item Blueprint - hidden link
Ok, I go to the edit page of this item and see that field "Mobile-ready" is set on Yes(Есть) - hidden link
So I have no idea why this item is absent when I try filtering. With other custom fields all the same.
2) Archive for type "Online casinos" (Онлайн казино) - hidden link
There is much worse if I try filtering by any field I get no result, for example, field "Live-dealer" (Live-дилер) - hidden link
With other filters the same problems
Please, can you help me?
Hi there,
Thank you for contacting us and I'd be happy to assist.
I've checked both the custom fields ( "Mobile-ready игры" & "Live-дилер у провайдера" ) and it seems that the settings of these fields were changed after the posts in the "Провайдеры" post type were added.
To make sure the updated custom fields settings are applied properly to all existing posts, you can open their edit screen one-by-one and then save/update each post, so that the field settings and values can be saved properly, with each post.
For any new posts that you'll add in the future, the custom field settings and values will apply properly.
Note: I also noticed that you're saving the HTML and CSS code based values for these custom fields, which isn't a good idea.
It would be more efficient and safe to use simple text ( like "yes" & "no" ) or numeric values ( like 0 & 1 ) in these fields "Custom field content" column.
( screenshot: hidden link )
You can show complex HTML and CSS code output, based on the saved field value, using conditional display blocks on the front-end:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-types-fields-and-custom-fields/
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
>To make sure the updated custom fields settings are applied properly to all existing posts, you can open their edit screen one-by-one and then save/update each post, so that the field settings and values can be saved properly, with each post.
I resaved post a couple of times (hidden link this item), but it did not help and it still not filtered. I do not understand why.
And I resaved all casinos too, did not help...
Hi,
I apologize if my last message resulted in some confusion.
What I suggested was to re-save all existing "Провайдеры" posts ( which are in a total of 10 items ) and not just a single "Blueprint" post.
Also, the value to save in the database for these two custom fields ( "Mobile-ready игры" & "Live-дилер у провайдера" ), still includes the HTML and CSS code, which will result in conflicts, when used with search filters.
( screenshot: hidden link )
To simplify this, here are the steps, in the correct order:
1. Please go to "Провайдеры" field group's edit screen ( hidden link ) and save "eсть" for yes and "nет" for no, for both these fields in "Custom field content" column.
2. Next, go to "Категории провайдеров" WordPress Archive view ( hidden link ) and make sure that the same values are updated into the "Search and Pagination" section.
( screenshot: hidden link )
3. After that, you can go to "Провайдеры" post type list ( hidden link ) and open all posts, and re-save them all.
Please let me know how it goes.
regards,
Waqar
My issue is resolved now. Thank you!