Skip Navigation

[Resolved] How to display a view in a layout using a shortcode

This support ticket is created 4 years, 6 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 4 replies, has 2 voices.

Last updated by Shane 4 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#1716399

Tell us what you are trying to do? I've copied a previous view and added it to a layout, but the list content isn't displaying, instead I'm seeing a shortcode.

Is there any documentation that you are following?

Is there a similar example that we can see? I'd like the "Doctors accepting patients for Weight Management" to function in the same way that "Doctors accepting patients for IUD Insertions does"

What is the link to your site? hidden link

#1716437

Shane
Supporter

Languages: English (English )

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

Hi Chris,

Thank you for getting in touch.

I'm actually not seeing any view shortcode on this page.

What I'm seeing is [doctors_list_weight_management]

I'm assuming the above is what you are trying to render the view with correct?

If so then you are using the incorrect shortcode. The correct format should be [wpv-view name="My amazing custom post list"]

So you will replace "My amazing custom post list" with the name of your view.

Please let me know if this helps.
Thanks,
Shane

#1717375

Thanks Shane!

I've changed the setup to match what you suggested, I'm now getting "no items found" listed under "Doctors accepting patients for Weight Management", even though I have Dr. Ankit Vakil marked as accepting for that service.

As I mentioned in my first message, I have this view setup the same as the Botox and IUD Insertion views, and those appear to be working as they should.

Do you have any suggestions why the Weight Management view might be returning a "no items found" error?

#1717401

Shane
Supporter

Languages: English (English )

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

Hi Chris,

This is perhaps being caused by the filter that is on the view.

Would you mind allowing me to have admin access to the website so that I can have a look at this for you ?

The private fields have been enabled for your next response.

Thanks,
Shane

#1717513

Shane
Supporter

Languages: English (English )

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

Hi Chris,

Ok so I took a look at your website and your plugins are really outdated. Based on the filter your view should return a result but it could be a bug in this version of the plugin.

I would highly recommend that you perform a full update of your wordpress install as well as your plugins so that you can benefit from all the security updates that has been made by the wordpress team as well as from other plugin developers.

Once you have done this please let me know.
Thanks,
Shane