Skip Navigation

[Resolved] How To Give Business A Choice of Header Type And Then Display That Choice

This support ticket is created 5 years, 11 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 5 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#1183652

Tell us what you are trying to do?

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.

hidden link

What is the link to your site?

hidden link

#1183727

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Curtis,

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.

Thanks,
Shane

#1183738

I think I used the term "header" incorrectly. I want each individual search result to have just 1 of 3 types of "hero" section at the top of the page.

If they've selected that they want a static image section, they would then be prompted to upload an image of the appropriate size.

My question is how do I design my custom post template to display the appropriate content?

If the business selects an image for their top "hero" section, then the fields for slideshow or testimonial can't be loaded or shown.

Hope this helps clear it up.

Curtis

#1183751

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Curtis,

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.

Please let me know if this was clear for you, also please check out these document below.
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
https://toolset.com/documentation/user-guides/view-templates/

Looking forward to hearing from you soon.

Thanks,
Shane