I am trying to: create a slider or a grid from a the loop-wizard in views showing (related posts) to the single post that will be shown in a content template made for that post type, for example : trying to make a view or a slider that displays related (iphones) to that iphone that being showed in a template for a post type called cellphones, but the related posts (related iphones) should be shown in that view or slider are all should all be iphones only based on the data that entered in custom fields,( assuming my custome fields are : a dropdown list, choose a cellphone [iphone,samsung,..ets], then another dropdown list that has conditional output shows says choose model : [iphone5,iphone6,....] and then a dropdown list with no conditional output say choose color :[black,white,...] assuming these are my custom fields ) the only options that I found when I was setting up the query is when I add a filter and then choose filter by custom field and then I choose the list custom field that says choose iphone model I get to set a query based on that custom fiels is a ( string,number,...etc) is (equal,not equal,like,....etc) but I have tones of models for the iphone should I make a view for each model of iphone !! [ if for example a (black) (iphone 6) is shown in the single template I want the slider to show only other black iphone6s ]
( the black and iphone 6 are choosen from a custom fields not from taxonomies of colors and types )
I hope my question is clear now.
I'm justing using iphone as an example to make it easy to understand what I'm trying to do. my list is way bigger than that.
thanks
I visited the : views plugin to create related posts based on data from custom fields
I expected to see: flexibility to use short codes
and one more simple question, for this kind of post types when you can have different makes of cellphones and the different models and then list of colors, is it better to use taxonomies, like taxonomy for make and taxonomy of model for each make and then taxonomy of colors, or I just keep using dropdown list custom field, because at the end I want to create a form for customers to submit there posts too, and i know by default taxonomies can have more than one option and uses checkbox instead for one post.
thanks a lot
Hi
I assume you are going to add a parameter search form into the view, I suggest you try the feature of Views plugin:
Limiting Filter Inputs According to Available Results
https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/
Select Show only available options for each input and Views will automatically limit the options of each filter input, when visitors select other inputs.
For your second question:
is it better to use taxonomies, like taxonomy for make and taxonomy of model for each make and then taxonomy of colors
I suggest you use the custom taxonomies for them, since you will be able to add more terms when you create new posts.
Hi Luo Yang,
Thank you for your kind reply, Limiting Filter Inputs According to Available Results is another feature that I will be working on later, for now I am still working on creating a template of a single post of a certain type of post types, for example the iphone single post of the cellphones post type,
in the template itself I want to show related iphones to that iphone is currently shown without having the visitor to do anything as a search feature ,
this picture in the link show exactly what I want to do :
hidden link
I want the results shown based on data from custom fields, I got to this point from following the steps in here : Filtering Views Query by Custom Fields
https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/
in this field here I don't want to type villa, apartment .... etc,
hidden link
I want it to be automated I want to insert toolset shortcodes such as :
[types field='choose-make'][/types]
or :
[types field='choose-model'][/types]
or even both , based on what custom fields I choose.
is there anyway to do that, by the way I don't have the option [CHAR],
and this view will be placed inside a content template for all the cellphones
thanks again
Thanks for the details, the best way is setup custom taxonomy "Model", then you just need to add only one filter in the view:
Select posts with taxonomy:
Model the same as the page where this View is shown
See our document:
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/
Value set by the current page where this View is shown
The View is always inserted somewhere. That page where the View is inserted is responsible for setting the taxonomy term. This is good when you want the same View to return different results, according to the page it’s inserted to.
thank you again for you help,
great knowing that, but I'm worried that I have lists of Models for different lists of Makes, that is not the problem, what I am worried about is that using custom fields helps me set an output condition for the list of Models to show when a certain Make is chosen, using taxonomies for Models will show all the Models of All Makes on the right side as checkbox, I need to show only one list of model for that Particular make when a visitor or I add a new product.
another thing I am worried about when I create all the Models as custom taxonomies, is when I create a Front-end form, all the models will be shown and also will be shown as a checkbox, not as a drop-down list, not only that but an "add new" button will appears but thats not a problem I can get rid of it, is there anyway to show taxonomies as a drop-down list and have a conditional output , like this list of Models will only appear when Make 1 is chosen ?
I am so greatful for your help
In the CRED form, you can display the taxonomy as a select dropdown by adding attributes in the shortcode [cred-field], for example:
[cred-field display='select' single_select='true' ...]
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field
‘single_select’=> [optional] ‘true’ | ‘false’ (default) – If the display=’select’ argument is set, then single_select=’true’ will only allow a single option to be selected (by default multiple options can be selected)
you are A M A Z I N G !!
thanks a lot that worked, I just have a small question about the Taxonomies, now I will be creating a taxonomy for each Model I have, because in the way that I assign a taxonomy in CRED I can't choose child ones, the only option I have is showing both the parent and the child ones as a hierarchical list, is there anyway to choose child taxonomies only? if there isn't I will be creating taxonomies for each model.
thanks a lot you made my day now I can go swim in the ocean : )
You are right, there isn't such a feature within CRED, you can create taxonomies for each model.