Skip Navigation

[Resolved] Creating a View for Testimonials

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

Problem:

Display posts in "Draft" status.

Solution:

Toolset post view will query posts in "publish" status by default

https://developer.wordpress.org/reference/classes/wp_query/#status-parameters

Retrieves posts by post status. Default value is ‘publish‘

so you just need add a post status filter in the post view

Relevant Documentation:

https://developer.wordpress.org/reference/classes/wp_query/#status-parameters

This support ticket is created 2 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 – 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 WilliamM1564 2 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2310985
Edit_Page_“Test_Testimonials”_‹_Rockstar_Psychics_—_WordPress.jpg

Tell us what you are trying to do?
I don't suppose creating Views have changed in the last few days. I swear this isn't working like the other Views I have created.

I have created a View for Advisors which is working (with some problems, see other ticket). But I can't seem to get this one even started.

I created the View first with the Wizard and then inserted it into a page like I did when I was working out the Advisor View.

However, here I am unable to edit the View within the page in the block editor. It just displays messages "No items found" and "This is a preview of the Testimonials view"

I cannot seem to add or edit fields within the View with the block editor, I cannot seem to edit it all here, much less use the grid.

It seems to me that it might be because there are no Testimonials associated with this page. So I had trashed the initial view and created a new one without any filter. If I understand correctly, it should show all Testimonials (there is only one at the moment).

Could you help me figure out what I am doing wrong?

My first objective is just to display all Testimonials. Once I can do that, I want to be able to display only the Testimonials for a specific Advisor but I cannot even get started with this.

Is there any documentation that you are following?
Not that I can find.

Is there a similar example that we can see?
I just want to display the contents of all of the testimonials. Eventually I only want to show the testimonials for a particular advisor but at this point I will settle for all Testimonials independently of Advisors on this page.

What is the link to your site?
hidden link

#2311093

Hello,

Which post view are you going to display?
I have tried it in your website:
Edit the page you mentioned above:
hidden link
Insert a view block, choose existed view "All Advisors"

It works fine:
hidden link

Is there anything missing?

#2311653

Yes, I am trying this with the view "Testimonials", and I just get what is shown in the image I uploaded earlier in this thread.

When I first created the "All Advisors" view I was able to add field, change settings etc right in the block editor.

#2311749

Thanks for the details, there is only one "Testimonials" post in your website, which is in draft status, Toolset post view will query posts in "publish" status by default
https://developer.wordpress.org/reference/classes/wp_query/#status-parameters
Retrieves posts by post status. Default value is ‘publish‘

so you just need add a post status filter in the post view "Testimonials":
hidden link
section "Query Filter":
Select posts with status of publish or draft.

Test it in frontend:
hidden link

It works fine

More help:
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-post-status/

#2311819
Views_‹_Rockstar_Psychics_—_WordPress.jpg

OK, I changed the Testimonial post to Published and I got through that problem.

But fundamentally, editing the All Testimonials view is substantially different than editing the All Advisors view and I cannot figure out why. I am noticing this because I know how to format and work on the All Advisor view but I cannot do the same thing with All Testimonials.

I did find one clue (see attached screen capture).

In the list of views, All Advisors looks completely different than the other views. Why? You will see it is grey and not a link where the others are all blue links. You will also see that when I hover over it I ONLY get the option to edit within a page but I do not get that option for All Testimonials. Right now, I only know how to edit a view within a page, but I cannot seem to do that for All Testimonials.

Do I need to learn two methods of editing Views?

Is there a way to make All Testimonials like All Advisors so that I can edit it in the block editor?

One of the things I cannot figure out is the Rating block. When I try to add one to the All Testimonials view, I get a message that that block can only work inside a view -- but I cannot get it in there! If this was All Advisors I could just click inside the view and add the block I wanted. I cannot do that here.

Thanks so much

New threads created by Luo Yang and linked to this one are listed below:

https://toolset.com/forums/topic/blocks-editor-and-classic-editor/

#2311901

According to our support policy, we prefer one ticket one question
https://toolset.com/toolset-support-policy/
for other new questions, please check the new thread here:
https://toolset.com/forums/topic/blocks-editor-and-classic-editor/

#2315263

My issue is resolved now. Thank you!