Skip Navigation

[Resolved] Views – Guidance on how to display content with views based on specif parameters

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 8 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 13 replies, has 2 voices.

Last updated by MicheleV864 8 years, 7 months ago.

Assisted by: Beda.

Author
Posts
#331134
Screen Shot 2015-09-05 at 8.48.01 AM.png
Screen Shot 2015-09-05 at 8.46.41 AM.png

I am trying to: have content show up in views, and not sure how to specify the content

I visited this URL:

I expected to see:

Instead, I got:

Hello, I'm trying to wrap my head around how to make something happen since I'm a huge novice. Here's a rundown, but I've also attached a screenshot and link to my existing site which I'm somewhat modeling this after..... My new wordpress site has the colorful map (www.bhluedotcom.com), my existing site which I'm modeling this after is the screenshot titled New Hampshire. (www.bhlue.com)

1. i have a landing page I'm working on that allows visitors to choose a US state where they can get more detailed info about that state. hidden link

2. I created a custom post type for each state

3. I want each state CPT to have various "headings" on it (ex. schools, scholarships, internships, etc.) that are consistent for each state

4. Each of those headings will have "subheadings" (which will also remain consistent for each state, but may differ for each heading

5. Within each of those subheadings is where there will be differentiation based on the state. For example, a specific subheading within a state may have resources listed only for that state and not another, but may also have resources that are available in multiple states.

Questions...
1. Should the "headings" be custom post types or taxonomies?
2. Should "subheadings" be custom post types or taxonomies?
3. What would the process be to be able to do something like this. Views with queries? Parametric searches? I'm lost and just need some guidance on what to do, and then I can make it happen.

Here is the link from my existing site (which I'm modeling this after) so you can see the functionality I'm referring to. hidden link Again, screenshot (New Hampshire) is attached.

#331239

Thank you for contacting us here in the Support Forum

While I am not sure that you need a different Custom post Type for each State (you could just have many entries in a CPT "State", as example, "California"; "Alabama", etc), I think it would be best to have taxonomies that let you sort those Headings and Subheadings.

In your View you could then display those Headings and Subheadings (CPT's) by their taxonomy.

It could though also be down with a Parent / Child relationship.

To give better advice, I need to know:

1. Headings and Subheadings, is their content different for each State?
OR
Can each state share a Heading or Subheading (I speak of the content of those) ?

2. When you click on a State, do you want to be lead to the Post (single) or only update the Views Results on that same page?

3. Is there any additional info or relationship you want to display later on, so I can already rethink this to avoid later complications?

Please could you provide me the additional Infos?

Thank you for your patience.

#331533
Screen Shot 2015-09-07 at 1.55.20 PM.png
Views description for Map resources.jpg

Hi,
Answers to your questions....

1. Headings and Subheadings. Same for each state.

2. When you click on the state, you would be directed to the Post for that state, and there would be updated Views results as well. (as I'm constantly adding new content)

3. Currently I created a Custom post type for "States" and have 50 of those.

4. Additional relationships.... see attached image. I think that better explains what I'm trying to do

Let me know if I'm not clear or if you need more info to see what I'm trying to do. Thanks so much!

Michele

#331776

Thanks for the Details

OK, let's go for it step by step.

I think the end product will be a Page, where on the left you can click on a state and on it's right, depending on which state you clicked, the results (headings, etc) are updated according to the state you clicked.
Just as seen here:
hidden link

On the other hand (approach is same, design different), you could have this:
hidden link
When you click on a state, you would be take to a single Post (state) where al info jus displayed.

I think the first example is nicer?

How you style the very same Page itself I leave to you, as it seems, you already have done much styling and successfully divided the page in columns and sections.

What I would do is:

1. Create a Taxonomy "State"
2. Add all states to it
3. Create your content that has to belong to each State (everything that goes in the headings and subheadings)
==> This are Custom Posts. (schools, scholarships, internships, etc)
4. Set for each of those the correct taxonomy (state) it belongs to
So as example, "Nat'l Sustainable Agricultural Info Services" would belong to "Idaho"
etc.

Then you can build a View, where you display content (your above CPT's)

In the Loop of that View, you style your output as desired, with all accordions and sections.

Include a Parametric Search for your taxonomy "state" and style it as you want

Then insert the View in your Page, by eventually styling this Page with a Content template, so you can have the search Form (taxonomies "state" list) on the left, and the results (CPT's) on the right.

Please let me know if you have further questions regarding the issue mentioned in this Thread

Thank you for your patience.

#331782

Thanks so much for the step by step! I'm going to work on this today based on your suggestions. I'll let you know if I get stuck, or need further guidance. Again, thanks for your help. You're a huge help each time I need assistance figuring something out 🙂

#331826

Thank you 🙂

Please let me know if you need further infos about this and let me know if the above solution works for you,

I look forward to your reply!

Thank you for your patience.

#332102

Hello Michele

I do apologize in advance if this is going to confuse you but I might have a much better idea.

I suggest you start this with some dummy content anyway, to see how it goes and where your goals are, so we could adjust.

What I would like to suggest is instead of a Taxonomy Parametric Search where your States are Taxonomies, is a Parent / Child Relationship.

Since you already have your "State" CPT, please set up a CPT where you will hold your "First headings"

Make it to be child of "States"

Add some content, where your items in "First Heading" are each assigned to one State.

Then, in the View, Query the "First Headings"

In the Parametric Search choose "Post Relationship" basic Filter and insert it.

What this will do, is project a Filter with all available "States" in the Filter (Parent Tree)
Clicking on one of those, would then display the Child of this state, which is a "First Heading"

The limit here, is that each state would need it's specific "First Heading" Post content.

Each Child can only have ONE parent of the same CPT, that's why

Please try both approaches and let me know which one goes better for you.

Each has it's limitations and features 🙂

I always suggest to go locally or on a staging environment, before you go live. This way you can easily change things, re-set things and experiment per-need

I'm here to help if you need more info or help.

Thank you for your patience

#332410

Hi Beda,
Thanks for continuing to think about a solution for me! I will definitely try both ways since I'm still working on wrapping my head around how to do this. Today's a busy day for me, but I plan to have this worked out by the end of the weekend so you just might be hearing back from me within that timeframe 🙂 Hopefully I'll just be touching base to say "I GOT IT!" I'll be in touch. Thanks again! I have to say, the support you have given me while I'm learning this is unfreakingbelieveable and a testament to my faith in Toolset 🙂

Michele

#332445
taxonomy Industries.png
Massachusetts State CPT example.jpg
taxonomy US States.png
taxonomy Career Resource Categories.png
State CPT list.png
state PAGE.png

Hi Beda,
Back to you sooner than I thought! How about this, based on your previous email where you said....
" When you click on a state, you would be take to a single Post (state) where al info jus displayed."

This is how I'm thinking it might work based on your suggestions and what I would like to have happen. Could you tell me what you think. I'm probably way off base so please let me know so I can wrap my head around a new way and not spend any more time on this way. Thanks 🙂

1. I have a "page" that has each of the states listed, and a map (for visual interest) where any state can be clicked on. (see attached "State page" ) This will bring up the Custom Post Type for that particular state

2. I created a custom post type called "States", and within that I have 50 states. (attached "state CPT list")

3. I create a content template and attach that content template to each of the 50 states. that way each of
the states has the same formatting with the same headings (ie. education & training, scholarships, etc.)

4. I create taxonomy called "US State" (there are 50 of these that can be chosen from ) (attached "US States)

5. I create taxonomy called "career resource category". These will be the same as the headings (ex. school, scholarship, etc.) (attached "taxonomy career resource category)

6. I create a taxonomy called "Industries". (attached "taxonomy industries")

7. I create a custom post type called "Career Resources"
- this is where I would add each of the resources (ex. Mass Institute of Art, Fashion Design Scholarship, etc.)
- When I enter a new "Career Resource" (ex. Mass Institute of Art), I would choose MASSACHUSETTS for the taxonomy "state", EDUCATION & TRAINING for the taxonomy "career resource category", ARTS... for taxonomy "industy"

8 . Question... I then need to have each of the "Career Resources" I've added (ex. Mass Institute of Art, Fashion Industry Scholarship, etc.) show up for the state it's assigned to, as well as within the heading (ex. Education & Training, Scholarship, etc.), and industry (ie. Arts... ) it's assigned to. Similar to the mockup in attached "Massachusetts state CPT example.

9. Would Parent-Child relationships be useful for searching or whatever?

Have I totally confused you with my explanation? Did I do tons of work and it's totally not going to work out this way? That's ok, I would ust need to shut down my thinking about this soon before I spend too much time going in this direction. Anyway, let me know what you think, and apologies for the very LONG and convoluted post!

Michele 🙂

#332538

I apologize the delay here

That statement was with your currently new setup in mind, and not with the "sidebar list" of states (even though it would also be possible this way)

If you like it this way, to have a "list" of states only, and the detailed info on a "single state" page/post only,

1. OK - You will click on a state and being lead to the single state post

2. OK

3. OK - you can also bulk assign the Content Template and even make it default for all newly created States

4 - 9

This is a possibility but if you have anyway the info of each state ONLY on each state's single post,
and it seems to me, each state has DIFFERENT type of industries, schools etc (they can't be shared by another state)...

Then you could by-pass the "States" taxonomy, and actually just make the Post Type that hold information (industry, resources, etc) to be child Post Type of "States"

Then you can assign a "Career Resource" Post to a parent "State"

Displaying this is done by querying the Child Posts ("Career Resource") in a View, setting the view to display content that is child of the post where this view is inserted.

Insert the view in your single's States Content template and your'e done.

Headings that are static can be coded in HTML in the Content template, while "Dynamic" content comes form the View.

Of course, this does NOT work if you want to share certain "Career Resource" across many states.

That is what I understood initially and that's why I suggested the both different approaches.

Do you have this on a test site?

Can I look at it from your View?

I would need to request temporary access (WP-Admin and FTP) to your site
- preferably to a test site where the problem has been replicated if possible -
in order to be of better help and check if some configurations might need to be changed

Your next answer will be private which means only you and I have access to it.

❌ Please backup your database and website ❌

We could also use discover-wp.com test sites, that's a actually great tool to find the best way to approach things together.

Please let me know if you have further questions regarding the issue mentioned in this Thread

Thank you for your patience.

#333047

Thanks for the Details

This is a slightly different approach but as far I understand, much simpler.

1. The Career Resource landing page will be styled with the headings of each "resource type" (see attached "career resources landing page").

==> here you could simply work with either Taxonomies or parent / child relations ships
I both cases, you would display a View on that Page that displays posts either Child of the Page where this View is inserted, or Posts with Taxonomy set by the page where this View is inserted.

I think simplest would be that you would have a Taxonomy "Career Resources", and with a View you display all terms in the Taxonomy (Military, Apprenticeships, etc)

Inserting as example the [wpv-taxonomy-link] would allow you to navigate from this List of Terms to the Terms Archive, where all your Posts with this Term assigned are displayed.
(as example Apprenticeships > Apprenticeship 1, 2, 3, etc)

Archive Pages can be styled with Views WordPress Archives.

What you can not do with above approach is a Parametric Search.
Parametric Searches are only allowed on Post Views.

I would suggest you go ahead and create some dummy content on your discover-wp site.

Make sure to install a test site that includes Views Plugin.

After you have some example content I can login and propose several approaches to list your content.

Please could you provide me the additional Infos?

Thank you for your patience.

#333052

Thanks, Beda! I'll take a better look at this today and try this method out.

Also, I'm working on another "view" for something else on my site, and will likely be sending you a new post/message with questions if I get stuck on that also. Lucky you! Thanks again for continuing to be patient with me and sending me so many ideas to solve my problems. Talk soon.

Michele

#333269

I apologize the delay here

Sure, please doth hesitate to consult me (or other supporters) in case any issues surge.

If you have questions on other Views/Setups/installs I likely tend to suggest to open new tickets, because each ticket is tagged and threading a specific Topic.

It helps keeping it clean and we can focus on one issue a time/ticket.

Please let me know if you have further questions regarding the issue mentioned in this Thread
and do not hesitate to open a new thread if other issues or problems arise

Thank you for your patience.

#335282

I'm all set finally! I figured it out. Thanks so much for all of your help in walking me through this.

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.