• Resolved vivianso83

    (@vivianso83)


    Hi, I am just passing on what a support from another plugin wrote. This line of text has been causing an error for my blog. It is temporary fix. But if you don’t fix the code, next time I update your plugin, the error will show up again.

    Can you help to fix this code?

    Please see forwarded msg
    ——

    Hi,
    We checked further into this and the problem appears to be caused by the plugin List category posts. Within the /list-category-posts/include/lcp-catlist.php at line 102 there is this code:
    
    remove_all_filters('posts_orderby');
    
    That removes all existing filters for any plugins/theme, which makes our code to not trigger anymore for any of the queries. I have no idea why they do that, you may want to get in touch with the other developer for more details.
    Meanwhile, I've commented on that line and everything appears to work fine now. Now you can just chose the category at the sort https://joshviv.today/wp-admin/edit.php?page=apto_edit-php and make the order adjustments. No need to create additional sorts you can use that for all. 
    
    Thank you,
    Dan
    Support Department
    https://www.Nsp-Code.com

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor zymeth25

    (@zymeth25)

    Hi, this line was added a long time ago to prevent other plugins and themes from interfering with ordering options set in LCP shortcodes. Of course the downside of nuking other plugins and themes’ filters is that you can then use LCP ordering only. I assume you want to use LCP and another plugin’s custom ordering on one page. We will keep that line for backwards compatibility but will also add a shortcode parameter to disable it.

    Thread Starter vivianso83

    (@vivianso83)

    yes, may you let me know when you have the new update, so I can use your plugin along with the other plugin in peacefully?

    Plugin Contributor zymeth25

    (@zymeth25)

    @vivianso83 I have added the keep_orderby_filters parameter to solve problems like the one you are having. We have not published a new release yet but you are welcome to test the development version by downloading it from:

    https://github.com/picandocodigo/List-Category-Posts/archive/refs/heads/master.zip

    You will have to add keep_orderby_filters=yes to your shortcodes.

    Plugin Contributor zymeth25

    (@zymeth25)

    Implemented in v0.87

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Your plugin has a code that causing a problem for my blog’ is closed to new replies.