Skip Navigation

[Resolved] View to list posts grouped by parent Post

This support ticket is created 2 years, 3 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.

Our next available supporter will start replying to tickets in about 6.55 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 26 replies, has 2 voices.

Last updated by LandruF8417 2 years, 3 months ago.

Assisted by: Minesh.

Author
Posts
#2431243

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok great. You are welcome to mark resolve this ticket and feel free to open a new ticket with every new question you may have.

#2431297

Hi Minesh, I tried using the taxonomy option by copying the "Careers 2.0 ByStates" view and changed it to taxonomy instead. Now I get "no items found under" each state.

hidden link

The new view is named "Careers 2.0 bystate-Lateral"

#2431337

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please check now: hidden link

I've changed the "Query Filter" as given under for the following view:
=> hidden link

Taxonomy filter:
Select posts with taxonomy:
State of Career Opportunites set by the parent Taxonomy View

I can see its working as expected. Can you please confirm.

#2431369
Screen Shot 2022-08-04 at 12.58.08 PM.png

Thanks Minesh. It's better! Is it possible to hide the empty results? That way, so that the attached portion (at the end of the list) is not visible ?

#2431391

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please check now: hidden link

Within the following view, we are passing the taxonomy term title with the view's shortcode attribute tax:
=> hidden link

[wpv-view name="careers-2-0-positions" tax="[wpv-taxonomy-title]"]

And in the child view that displays the career posts, we are catching the view's shortcode attribute "tax" value using the shortcode:
=> hidden link

	[wpv-attribute name='tax']

I've also removed the no items found section from the child view:

[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]

I hope this is now resolved :), really glad to help.

#2431399
Screen Shot 2022-08-04 at 1.27.17 PM.png

Thanks Minesh! That worked perfectly!

One more question before I mark this resolved.

My plan for an alternative solution for the search feature I wanted originally.....

Instead of having a search option, I will have 3 separate full listings like what you helped me with. Each list will show results for one the type of position. Then I would use Tabs, to switch between the lists of types of positions...

I tested filtering the current list by adding a filter to the positions view (see attached). It's working for this list. But this means that I will have two views for each list of the 3 position types (6 views in all). Is this the best solution or is there a better way? I was hoping that I can just have one child view (positions)and three parent views (states).

Please let me know and again, Thanks very much for you help.

#2431669

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please tell me what view you are talking about and to what view you added that additional filter?

#2431923

The two views I'm referring to are #10137 "Careers 2.0 positions" and #10164 "Careers 2.0 bystate-Lateral". I added the additional filter to #10137 "Careers 2.0 positions"

The result is on this page:
hidden link

#2431929

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

You can use the same view but you need to change the filter to filter by view's shortcode attribute:
=> hidden link

Select posts with taxonomy:
Hiring Types slug in one of those set by the View shortcode attribute wpvhiringtype
eg. [wpv-view name="view-name" wpvhiringtype="xxxx"]

And the you should use the same view as:

[wpv-view name="careers-2-0-positions" tax="[wpv-taxonomy-title]" wpvhiringtype="professional-support-staff"]

Then you can use the same view but for another hiring type as:

[wpv-view name="careers-2-0-positions" tax="[wpv-taxonomy-title]" wpvhiringtype="entry-level-associates"]

More info:
=> https://toolset.com/documentation/legacy-features/views-plugin/passing-arguments-to-views/#controlling-the-filter-with-shortcode-attributes

#2431969

Great! That works. So all I need now is 3 parent views (for the different hiring types) and the 1 child view (for positions). So from here, all I need to do is duplicate the current parent view and edit the shortcode in the loop of the two new parent views, correct?

Once you confirm that I have this right, I'll mark this as resolved. Thanks!

#2431971

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - thats correct 🙂

#2431973

Awesome. Thank you very much fro all you help Minesh!