Navigation überspringen

[Gelöst] I just need to do some design stuff

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:

on each tour post, and showing only those related review posts.

Solution:

The reference field is based on one-to-many relationship, so in a single "cycling-tour" post, you can create a post view:

- Query reviews posts

- Filter by post relationship between "cycling-tour" and "reviews", the relationship name is same as your custom reference field.

- In view's loop, display the "reviews" post information

Relevant Documentation:

https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items

This support ticket is created vor 4 Jahren, 7 Monaten. 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)

Dieses Thema enthält 11 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von fred-r.M vor 4 Jahren, 7 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#1616143

Dear Luo Yang

Great, this worked - I just need to do some design stuff. You might know what I should change.

The field I used now, the select at "Tour (I took part in this tour)" - how can I middle the text and arrow?

Then, this is normal, when I like to redirect after fill out the form, that I get an url parameter like this?

versteckter Link

The next part I like to do, is to do a view, where I used to have then on each tour, and showing only those related reviews. Do You have a documentation for this? I assume, I can use now this new used field?

Regards

#1616149

Dear Simon,

Q1) how can I middle the text and arrow?
I have checked the URL you mentioned above, I can see the message text is aligned in center, is this problem resolved?
If not, please elaborate the question with more details, how do you want to middle the text and arrow? please take a screenshot for it.

Q2) on each tour, and showing only those related reviews.
The reference field is based on one-to-many relationship, so in a single "cycling-tour" post, you can create a post view:
- Query reviews posts
- Filter by post relationship between "cycling-tour" and "reviews", the relationship name is same as your custom reference field.
- In view's loop, display the "reviews" post information
See the document:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items
Section "Displaying many related items"

#1621085

Dear Luo Yang

I tried to do it as this documentation. But as I not use "blocks" for it, I am not sure how to reference both CPT. I will add later just the view shortcode into our template.

I appreciate, if You could help a bit more.

Regards,

Simon

#1621127

Dear Simon,

Without Toolset Blocks, you can try as I mentioned above:
https://toolset.com/forums/topic/i-just-need-to-do-some-design-stuff/#post-1616149
create a post view:
- Query reviews posts
- Filter by post relationship between "cycling-tour" and "reviews", the relationship name is same as your custom reference field.
- In view's loop, display the "reviews" post information

If you need more assistance for it, please provide a test site with the same problem, also point out the problem page URL and view URL, I can setup a demo for you.

#1632557

Hi and good day Luo Yang

What I have done now, so far: versteckter Link

And need some smaller help...

At the moment, it shows only one review, but I like to have 3 reviews in a row, and a slider.

How to I create the loop for it? I have already this:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
	<wpv-loop wrap="3" pad="true">
		[wpv-item index=1]
      <div class="row">
			<div class="vc_col-sm-4">[wpv-post-body view_template="Review Slider on a Tour - slide"]</div>
		[wpv-item index=other]
			<div class="vc_col-sm-4">[wpv-post-body view_template="Review Slider on a Tour - slide"]</div>
		[wpv-item index=3]
            <div class="vc_col-sm-4">[wpv-post-body view_template="Review Slider on a Tour - slide"]</div>
             </div>  [wpv-item index=pad]
			<div class="vc_col-sm-4"></div>
		[wpv-item index=pad-last]
			<div class="vc_col-sm-4"></div>
	</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]This tour does not got any reviews yet.[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]
#1632679

You can follow our document to setup the view as slider:
https://toolset.com/documentation/user-guides/views/creating-sliders-with-types-and-views/
And you need to setup this setting: 3 items per page

#1633311

Dear Luo Yang

I might get closer, but it still not working. Is it possible to tell me what I am doing wrong - please.

versteckter Link

I not get a slider and not get columns.

Regards

#1634089

I am not sure how do you setup the view and sliders, please provide your website credentials in below private message box, I need to test it in a live website, thanks

#1636817

Thanks for the details, I have done below modifications in your website:

1)Edit "Phuket Roundtrip":
versteckter Link

In section "Cycling Tours Customer Reviews", add some child review posts

2) Edit the post view "Tour Review Slider":
versteckter Link
- In section "Query Filter", change the filter as below:
Select posts in a Cycling Tours Customer Reviews relationship that are related to the Post where this View is shown.
- in section "Loop Editor", change the codes as below:

...
    <!-- wpv-loop-start -->
    <wpv-loop wrap="3" pad="true">
        [wpv-item index=1]
      <div class="g-cols">
            <div class="vc_col-sm-4">[wpv-post-body view_template="Review Slider on a Tour - slide"]</div>
        [wpv-item index=other]
            <div class="vc_col-sm-4">[wpv-post-body view_template="Review Slider on a Tour - slide"]</div>
        [wpv-item index=3]
            <div class="vc_col-sm-4">[wpv-post-body view_template="Review Slider on a Tour - slide"]</div>
             </div>  [wpv-item index=pad]
            <div class="vc_col-sm-4"></div>
        [wpv-item index=pad-last]
            <div class="vc_col-sm-4"></div>
    </wpv-loop>
    <!-- wpv-loop-end -->
...

Please test again, and this is only an demo for your reference, since you are using "WPBakery Page Builder" plugin, you can check it with their support for the correct CSS class name

#1637309

Dear Luo Yang

Thank You - ok - this seems to working. Now, as I have a user "Post form", where customer can leave a review... those reviews not showing "automatically" respectively after publishing the review on the tour...

What did I wrong?

Regards,

Neue Threads, die von Luo Yang erstellt wurden und mit diesem verbunden sind, sind unten aufgeführt:

https://toolset.com/de/forums/topic/those-reviews-not-showing-automatically-respectively-after-publishing-the-review-on-the-tour/

#1638029

I assume the original question of this thread is resolved, according to our support policy, we prefer one question one ticket, for other new questions, please check the new thread here:
https://toolset.com/forums/topic/those-reviews-not-showing-automatically-respectively-after-publishing-the-review-on-the-tour/

#1638111

My issue is resolved now. Thank you!