Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1184114

    Tomaz Kavcic

    Hello,

    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.

    #1184138

    Hey Tomaz,

    Thanks for contacting us!

    I have forwarded your message to our devs. When we hear back from them, we will update you here :)

    Cheers!
    Yigit

    #1185625

    Tomaz Kavcic

    Hello Yigit,

    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:

    https://wordpress.org/support/topic/issues-with-restricted-content-and-enfold-template/

    What are your thoughts about that?

    Kind regards, Tomaz.

    #1185670

    Hi,

    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 :)

    Regards,
    Yigit

    #1186011

    Tomaz Kavcic

    Hello Yigit,

    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.

    #1189324

    Hi,

    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.

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.