Skip Navigation

[Resolved] Views inside content template

This support ticket is created 7 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.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Pat 7 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#476503

Pat

Hello,

I'm using WC and Toolset and have created a content template for the product page.
Now, I have also a Views integrated in this content template that list products in relation with the one which is displayed in the product page.

The product selection seems to work well, but the Views only displays post content and not what has been defined in the Views admin page. If I place the same Views in a page, then, everything works fine.

Any idea on what could be the issue?
Regards
Pat

#476567

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

Thank you for contacting our support forum.

I'm not entirely sure as to why the behaviour change for the view when it is added to the product page vs a regular page.

Is this a live site, could you setup an example where I can take a look at it on the frontend ?

Could you also send me the code of the view so I can have a look at that as well.

Looking forward to hearing from you soon.

Thanks,
Shane

#476579

Pat

Hi Shane,
Thanks for taking caree.
You can have a first idea with this link :
hidden link

You need to go to the bottom of the page (just under Des produits qui pourraient vous intéresser) to see the result of the Views.

Here is the Views :
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop wrap="4" pad="true">
[wpv-item index=1]
<div class="row ">
<div class="col-sm-3">[wpv-post-body view_template="Loop item in Produits liés sur page produit"]</div>
[wpv-item index=other]
<div class="col-sm-3">[wpv-post-body view_template="Loop item in Produits liés sur page produit"]</div>
[wpv-item index=4]
<div class="col-sm-3">[wpv-post-body view_template="Loop item in Produits liés sur page produit"]</div>
</div>
[wpv-item index=pad]
<div class="col-sm-3"></div>
[wpv-item index=pad-last]
<div class="col-sm-3"></div>
</div>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found] fact
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

I have just placed the Post Title in the "Loop item in Produits liés sur page produit" but as you can see, it is the content which is displayed (in fact, whatever you place in the content template of the Views, only the content is displayed).

Regards
Pat

#476960

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

So i'm seeing a table being generated.

Would mind allowing me to have access to the website so I can do some more investigation on this ?

The private field will be enabled for your next response.

Thanks,
Shane

#477126

Pat

Hi Sahne,

Looking a little more on this, I tried to make some desactivaiton and reactivation on the Toolset plugins.
I have also changed the Views that in integrated in the product template (now it is the [wpv-view name="produits-en-relation" wpvproductcat="[wpv-post-taxonomy type='product_cat' format='name']"]
It seems to work again but I'm not really quiet about this as I did not understand what's happened.
Any idea?
Regards
Pat

#477443

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

Not sure what could've caused it but a view is suppose to display the items in the same way no matter where you add it.

Is everything working as intended now ?

Please let me know.
Thanks,
Shane

#477525

Pat

Hi Shane,

The Views inside content template is now working (not sure how or why !!!), but I still have the same kind of issue with the search.
You can see it in the "recherche" page.
Regards
Pat

#478278

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

Could you send me a screenshot of the issue as the search works fine for me.

Thanks,
Shane

#478293

Pat

Hi Shane
Thanks for coming back on this.
In fact, I have re-read the search documentation and have put the search on a page and chose another page for the results.
Now this is working fine.
The other issue (content template with just the body) is also solved, but here, I'm not sure what has been done for this. I have made some go and return on different Views but don't know what was the root cause (which is a little annoying !).

Regards
Pat

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