Questions tagged [mu-plugins]
Must Use Plugins are loaded without a manual activation. They are stored in wp-content/mu-plugins and don’t need a regular plugin header.
49 questions
0 votes
1 answer
220 views
Disable Plugin if not logged in
I am trying to disable a chatbot plugin if the user is not logged in. In a MU Plugin I can use this filter - but the trouble is the is_user_logged_in() function does not yet exist, and neither is the ...
0 votes
1 answer
65 views
is_singular() in mu-plugins not working
I wanted to use mu-plugins to load the plugin only on a page with a single blog post. Unfortunately, the is_singular('post') function is not working properly. So I tried using $post->post_type, but ...
2 votes
0 answers
180 views
Can't load text domain in a mu-plugin
My plugin is in: /root/.../mu-plugins/my-plugin In /root/.../mu-plugins/my-plugin/languages/ I have the following files: my-domain.pot my-domain-fr_CA.po my-domain-fr_CA.mo The strings I want to ...
0 votes
1 answer
109 views
Is there a canonical way for a plugin to install a mu-plugin or drop-in?
I have a couple of plugins that need to install drop-in modules or mu-plugin modules when they're activated, and remove them when they're deactivated. This requires copying -- or maybe symlinking -- a ...
0 votes
1 answer
416 views
Unable to access WPadmin, website down
I'm not a dev. This is little too much for me. Can anybody just point me in the direction as to what the hell is going on?? Tried to recover a good working point. Tried disabling Plugins. Increased ...
1 vote
1 answer
1k views
why my must use plugins (mu-plugins) not work at localhost?
I have my local WordPress setup I create folder named mu-plugins in wp-content/plugins/mu-plugins and in mu-plugins directory I create one file and write a simple code for test my mu-plugins not work ...
1 vote
0 answers
29 views
Install a MU plugin from within another plugin
I am writing a plugin that needs to disable another plugin on specific pages of the site. I know how to do this using the option_active_plugins filter, but that filter only works from an MU plugin. ...
0 votes
1 answer
355 views
"Disable" specific plugins on certain pages
I want to disable specific plugins on specific frontpages, but not "disable" them in the backend, i.e. really disable them in the DB. Just NOT load them, as if they weren't installed. Did ...
0 votes
1 answer
815 views
Noscript not working as it should in wordpress site
This is what I've done in my custom functions mu-plugin: function jsdisabled() { print '<noscript> <div style="margin:auto; display:table; text-align:center"> <div style=&...
0 votes
1 answer
1k views
Notice: Uninitialized string offset: 0 in social sharing mu-plugin
I'm getting a Notice: Uninitialized string offset: 0 This is a mu-plugin that is supposed to show social sharing buttons and the only problem is happening with pinterest. Since it's not connected to ...
0 votes
0 answers
78 views
Using the get_template_part method within an mu-plugin not possible?
A while back, I had someone here help me craft a custom mu-plugin (aka: "must use" plugin) that was designed to specially handle 404 server responses. Here is that thread for context, ...
1 vote
1 answer
1k views
wp_get_environment_type is undefined
I don't understand wordpress, why is this wp_get_environment_type function undefined? Isn't this a "native" wordpress function? How can I make it defined? Here is my code inside of a MU-...
1 vote
2 answers
1k views
How to include a mu-plugin as a theme dependency?
I'm going through a tutorial which says that creating new post_types is best handled by creating a new mu-plugin (as opposed to adding it to the functions.php). I understand why, but what I don't ...
0 votes
4 answers
3k views
Enqueue custom css file on specific page
So I've been messing with this for a while now and I don't understand how I'm unable to pull in my style file properly by registering and calling it at all. Here is my method: public static function ...
0 votes
1 answer
134 views
Using mu-plugins on the Genesis Framework
So this is how I have my structure setup to attempt to create a mu-plugin for my page. Here is what I'm using: - Genesis Framework - Genesis FrameWork Child Theme Please let me know if the mu-...