Skip Navigation

[Resolved] View embedded inside content template for custom type

This thread is resolved. Here is a description of the problem and solution.

Problem:

I have the content template and view logic built to support each contributor, however, at the bottom of this template is the "embedded view" that should only show the articles "written by Greg Thomas ( as posts )" or with the "Author Name ( in post )" being Greg Thomas.

Just not sure of the logic to use to make this happen.

Solution:

You just need to setup each post's author to different WordPress user.

For example:

https://toolset.com/forums/topic/view-embedded-inside-content-template-for-custom-type/#post-2176813

Relevant Documentation:

https://toolset.com/documentation/user-guides/views/filtering-views-query-by-author/

This support ticket is created 2 years, 7 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by Woody 2 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#2175351

hidden link

Not sure how best to describe this so here goes ...

You will see that this website URL points to a custom post type for "Contributors" with the entry being for Greg Thomas.

I have the content template and view logic built to support each contributor, however, at the bottom of this template is the "embedded view" that should only show the articles "written by Greg Thomas ( as posts )" or with the "Author Name ( in post )" being Greg Thomas.

Just not sure of the logic to use to make this happen. Please assist.

Woody House

#2175741

Hello,

How do you setup the "embedded view"?
You can follow our document to setup a author filter:
Post author is the author of the page where this View is shown

See our document:
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-author/

#2176473

Thanks Luo ...

It is still not working so let me try to explain why ...

1) this is a magazine style website using the standard POSTS feature of WordPress to post articles each month
2) all monthly articles ( approx. 15 each month ) are displayed on PAGES as a magazine type format
3) we are updating the website to reduce overall number of views needed in the future
4) the link I sent you originally shows a different format whereby we are using a NEW Toolset Type called Contributors
5) each Contributor custom post is created by the WordPress Admin user "Woody"
6) I am trying to use a Content Template to display the "detailed view for each Contributor" created with embedded view in that Content Template to show "only those posts for each single Contributor" ...

*** but ... everything created on the website is done under user "Woody" so not quite sure how to continue ***

Make sense?

Woody

#2176475

Followup note ... there is NO "Author Name" associated against the "Custom Post Type of Contributors" ... so your solution may not work as there is nothing to refer that logic to ... ???

#2176531

By converting the Custom Post Type for Contributors to a WordPress PAGE with Author = Greg Thomas, I was able to make this logic work fine using the single logic based view

hidden link

My question remains, how can we or is it even possible to do the same thing with Custom Post Types ( after I added the Author field ) ... I do not see any reference in the software to do so ...

Cheers
Woody

#2176813

For the new question:
how can we or is it even possible to do the same thing with Custom Post Types ( after I added the Author field )

You just need to setup each post's author to different WordPress user.

For example:
1) Dashboard-> Toolset-> Post types, find and edit your Custom Post Types, in section "Sections to display when editing", enable option "Author"
2) Edit each posts of your Custom Post Types, setup the post author
3) Same as above, edit each "Contributors" post, setup the post author
4) In the single "Contributors" post, display a post view:
- Query your Custom Post Types
- Filter by:
Post author is the author of the page where this View is shown

#2177321

As always, the best support online anywhere!

Not sure why I was struggling with this in the first place as I had made it work before ... thanks for prompting me to do it the correct way Luo ... really appreciate your great support.

Woody House

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