I'm creating a directory site and would like to give businesses a choice of header to display:
- Testimonial
- Static Image
- Image slideshow
I know I can use conditions to show them the appropriate fields after choosing which type of header they'd like but how do I build out the header? (I'm using Editor).
Is there any documentation that you are following?
No, I haven't found anything.
Is there a similar example that we can see?
The link below will take you to a demo theme that has this feature. If you select LISTINGS/SINGLE from the main menu you'll see the three options users have.
Thank you for contacting our support forum. Are you referring to each individual results in the search would want to have their own unique header when visited?
If so then you can just create a generic template and add the generic fields to the Post that the user will be created.
- Testimonial
- Static Image
- Image slideshow
Then you can load these fields in your generic template because each business will have a different testimonial, static image etc.
Does your theme support a header in this fashion ? If not then you will need to build out a custom template php template for this. I can point you in the right direction on how to load the field values in the header but I wouldn't be able to assist with creating the custom header.
Then in this case you will need to use a conditional to check what the user had selected.
Then you will have your predesigned template that you will load based on the condition that is met.
This can be done using your views content template as it allows you to design the content area of you posts, so your conditional checks can be done here.