Home › Toolset Professional Support › [Resolved] Views for Users Not displaying In Loop
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/Karachi (GMT+05:00)
Tagged: Views plugin
I am trying to: display slider on users for a group using loop with content template
<div class="blogger-item">
<div class="blogger-image">[wpv-user field="profile_picture" size="medium"]</div>
<p class="blogger-name">[wpv-user field="nickname"]</p>
<p class="blogger-desc">[wpv-user field="description"]</p>
[wpv-view name="opinions-by-blogger" author="[wpv-user field='ID']"]
</div>
Link to a page where the issue can be seen: hidden link with empty contributors (right side widget)
I expected to see: contributors displaying users slider box with role Blogger
Instead, I got: empty
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
You created a Users View and added it to a sidebar widget, yes?
What you show above is from the output section of that View?
But what about the View settings?
The View would be set to display users of some particular role, and you may have included a Query Filter to show only some and not all such users.
What settings did you use?
Yes, the users view added to sidebar widget. The view set to display users with role Blogger. Attached is the complete view settings.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Those settings look okay, and I have tested something similar on my own local site which works.
Do you have a staging site for testing?
What happens if you disable all non-Toolset plugins and switch theme to twentynineteen or twentytwenty? Do you still see the problem?
How about if you add the View directly to its own test page, instead of as a widget?
Hi,
It is still the same even after I disabled non plugins and changed themes to twentytwenty.
The direct view page is hidden link and the slider showed momentarily and disappeared
Kindly please check.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
I can see the problem, but not the cause.
Could I get access to your site to check the set-up?
I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
I need to do some testing but this appears to be a live site, so I'm taking a copy to install locally, and I let you know what I find.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
I installed a copy of your site locally and stripped it down to just the Toolset plugins and a standard theme.
I also updated your plugins to the latest versions.
I still see the issue.
I noticed your use of comments in the Search and Pagination section would have broken the wpv-filter-controls shortcode, but that's not the source of the problem.
I haven't been able to determine what is, and so I'm passing this test copy of your site to my colleagues who can spend more time debugging further.
I'll get back to you when I have some news from them.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Eric
My colleague identified the underlying problem.
With user Views ajax pagination is not working correctly when the View output links to a template.
If you move the markup from your template directly between the wpv-loop tags in the Loop Editor (and also move your custom CSS) then the slider will work as intended.
We have an internal ticket for the developers to fix this, but in the meantime that's what you'll need to do.
Hi,
I am not sure if I followed you correctly because the display still missing. Kindly check the view editor and edit it .
Thanks
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
I meant copy the markup and shortcodes from the template to the Loop section, as you can see in the screenshot.
On your test page it nows appears to be working.
Hi Nigel,
Thanks for updating. The weird thing is when logout from wp-admin , it will not display role slider. Slider only appear when logged in.
TQ
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Where does the Blogger role come from?
I'm not sure what capabilities are required for custom roles to be available to guests in user queries, but it seems the Blogger role lacks the required capabilities.
My test site—where this works for guest users, too—has users with the built-in roles and it displays those no problem.
So I would identify how the Blogger role is registered as a starting point.
Hi,
The role Blogger was created by pluggin https://wordpress.org/plugins/advanced-access-manager/
I tweaked a setting in the pluggin and now blogger slider can display
TQVM
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
It's working? Great, I think we can close here?