Why is conditionally loading a custom plugin’s code only on a specific custom post type causing the site content to disappear?

I realize you’ve already answered your issue. However, I think there is some additional explanation possible to give more clarity to the issue and the solution. The issue is your lqdnotes_add_div() function. This is hooked to a filter – the_content. In WordPress, any time you use a filter, your filter function must return a value … Read more

wp_loaded hook block script enquequing

You can’t enqueue because wp_loaded is too early. To enqueue scripts and styles, you need to do it on the wp_enqueue_scripts type hooks, but because your exiting on wp_loaded, none of those hooks have fired yet. Additionally, you need to have the necessary function calls in the template for it to enqueue them into, such … Read more

Programatically download a plugin

WP CLI is best tool out there to manage plugins/ themes through command line, instead of uploading plugins through FTP or admin panel. Once you Install WP-CLI on your machine then run below command and see magic. wp plugin install bbpress –activate Please check WP-CLI official documentation for further understanding.

WP add_action factory

Check out the php callable manual. A PHP function is passed by its name as a string. Any built-in or user-defined function can be used, except language constructs such as: array(), echo, empty(), eval(), exit(), isset(), list(), print or unset(). However, in your code sample you are using an anonymous function, which can be passed … Read more