Hello, please advise how to do it right.
Testing page - hidden link
This is custom type post - "Bonus". It has custom fields.
Every added bonus can be selected like:
- Deposit (hidden link)
-- 1) Free Spins
-- 2) Percentage for deposit
or
No Deposit (hidden link)
-- 3) Free Spins
-- 4) Free Money
or
- 5) Cashback (hidden link)
Total 5 types of bonus
For example this bonus hidden link is type 1 - Deposit - Free Spins
---------------------------
So my goal is to create a view that will show bonuses of the same type on the bonus page.
At this moment I have View which display all last added bonuses - hidden link , but this bonus hidden link is Deposit - Free Spins. So I need a filter that will automatically display bonuses of the same type as the current bonus.
I tried different filter options, but nothing worked - hidden link
Hello, it sounds like you need a View of Bonus Posts filtered by several custom field values, each one set by a shortcode attribute. Each custom field value should be identical to the current post's custom field value. See the screenshot here for an example of this type of Query Filter setup. I can show you how to create something similar, but I think I may need to log in to give you the best advice. I'm not quite clear how the custom fields are implemented. It seems that there are 3 different custom field groups: Casino Bonus - Deposit, Casino Bonus - No Deposit, and Casino Bonus - Cashback.
Each custom field group contains several custom fields, including a checkbox field and radio fields.
It seems you need to set up Custom Field Query Filters for each of these fields:
- Deposit Bonus Type
- No Deposit Bonus Type
- Cashback checkbox
Each filter should be set up to respond to a shortcode attribute. Then you must pass the current post's custom field values into the corresponding shortcode attributes, like so:
[wpv-view name="Your View of Bonus Posts" depositbonustype="[types field='your-deposit-bonus-type-field-slug' output='raw'][/types]" nodepositbonustype="[types field='your-no-deposit-bonus-type-field-slug' output='raw'][/types]" cashbackcheck="[types field='cashback-field-slug' output='raw'][/types]"]
The attribute names depositbonustype, nodepositbonustype, and cashbackcheck are arbitrary, but must be unique for each custom field. You must change your-deposit-bonus-type-field-slug to match the slug of the Deposit Bonus type custom field, change your-no-deposit-bonus-type-field-slug to match the slug of the No Deposit Bonus type custom field, and change your-cashback-field-slug to match the slug of the Cashback checkbox custom field.
It is a bit complex, so I may need to log in to give you better advice. If you need more information, please share login credentials in the private reply fields here. I'll take a look at everything and give you some feedback.
Thanks, your advice helped me a lot My issue is resolved now.