February 13, 2020 at 12:03 pm #1184114
I’m developing sites for various partners and currently I spotted a strange issue with Enfold and I hope you’ll find a way to help me.
I’m using plugin “Restrict User Access” which, when restriction is activated for certain category, puts a simple post into wp_posts table. The post_type for this post is set to “condition_group” and this post is then displayed inside that certain restricted category, but it shouldn’t be displayed at all. I also tried this on many other templates (i.e. all bundled wordpress themes and Avada) and with all these themes posts of post_type condition_group aren’t displayed in categories, which is the correct behaviour.
Simply put, I’m wondering how would it be possible to setup Enfold to not display post_type “condition_group”? I know It’s doable via .css to not display class types condition_group, but this is a bit tricky as I also spotted that when using for instance “Magazine” from avia builder, there the class is then “av-magazine-type-condition_group”. This probably also happens for other structures. Doing this via css is also not ok for other reasons, for instance you set Magazine to show 3 posts and then only 2 are displayed as the one with class condition_group is set to display:none in css. In any case, not ok.
However, I guess a small fix is needed to Enfold code to not even enumerate/display posts which are not wordpress default post types. Also, why other templates doesn’t show these posts and work as expected, where’s the difference with Enfold?
Kind regards and thank you for help, Tomaz.February 13, 2020 at 2:01 pm #1184138
Thanks for contacting us!
I have forwarded your message to our devs. When we hear back from them, we will update you here :)
YigitFebruary 18, 2020 at 1:06 pm #1185625
thanks for looking into this issue. I actually talked to developer of the plugin as well and he also suggested this could be an issue with the theme itself and not the plugin. The conversation (and my possible fix) is available here:
What are your thoughts about that?
Kind regards, Tomaz.February 18, 2020 at 2:41 pm #1185670
Our devs said
We changed queries in ALB elements to get_posts as WPML did not hook into get_post(). So it should be possible to hook into a standard WP filter before the query and exclude post types.
Also, they said that if your current workaround does not break other things, that it is worth to use it as a simple workaround :)
YigitFebruary 19, 2020 at 1:16 pm #1186011
thank you for this answer. I understand the reasons for changing queries to get additional post types needed for WPML. However, manually adding workaround to “unregister” the specific post types when they’re not needed isn’t the best solution anyway and many people won’t be able to do it alone. Also, all posts from plugins like “user restrict access” which add additional taxonomies will be then displayed inside blogs, which also isn’t ok. I still believe only default wordpress post types should be displayed by default.
Is it possible for you to communicate with developer of that plugin and find a universal resolution to this issue? I believe it’s the best wat to solve this. I posted the link to the issue above, so you can get in touch with the developer.
Kind regards, Tomaz.March 2, 2020 at 5:13 am #1189324
Sorry for the delay. Can you give us a link to a page where we can actually see the issue? And please post the WP and FTP login account in the private field so that we can access the dashboard and the file server if necessary.
Have you tried using the avf_magazine_entries_query filter to adjust the query of the magazine element? You might be able to remove the condition_group taxonomy using this filter.
You must be logged in to reply to this topic.