Skip Navigation

[Resolved] Conditional Output based on View

This support ticket is created 5 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 5 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#1115158

I have a view setup that I want to hide if it is empty. I also want to hide the heading above the view.

See here with populated "Other Records by..."
hidden link

And here with no other records:
hidden link

Thanks

#1115575

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - you should simply try to display your view's title just after the shortcode [wpv-items-found] available in the section view's loop output. So, if results found, the title will be displayed otherwise not.

And, if you don't want to display anything when no results found than just remove the code available at the view's loop output section.:

[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
#1117832

Thanks, that worked however I am missing the title of the artist now.

For example it should say "Other Release by George Thorogood" but now is missing artist name.

See here:
hidden link

Code I am using is:
<p>[x_custom_headline style="color:white;" type="center" level="h6" looks_like="h6"]Other Releases by [wpv-post-title item="@artist-release.parent"][/x_custom_headline]</p>

Thanks

#1118127

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - could you please share access details so I can check the issue further.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

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