Skip Navigation

[Resolved] Query filter via registered third party shortcode value

This support ticket is created 5 years, 10 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 5 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#1181481
Screenshot 2019-01-10 14.01.52.png

I have registered third party shortcode [autor_role] which holds string with post author's user role.
I would like to use the value of the shortcode in Query filter because I need to filter out all posts of users belonging to a certain user role.

I have tried to achieve this via View loop:
<wpv-loop>
[wpv-if evaluate=" '[autor_role]' != 'inzerentneaktivni' "]

  • [wpv-post-body view_template="loop-item-in-inzeraty"]
  • [/wpv-if]
    </wpv-loop>

    It worked only partially - desired posts are not shown, but there are "gaps" in the final results displays. As you can see in the screenshot attached - final two li's are not rendered (correct) but the pagination is incorrect (two gaps before next result page continues). Therefore I think the solution might be to use Query filter. Is there any possibility to filter via the shortcode value?
    Thanks for help in advance

    #1181502

    Nigel
    Supporter

    Languages: English (English ) Spanish (Español )

    Timezone: Europe/London (GMT+00:00)

    Hi there, this is a duplicate thread, I have answered you in the original and will close this.