How do I share plugin settings across WordPress network?

The generic way to do it, is by using the pre_option_{option} https://codex.wordpress.org/Plugin_API/Filter_Reference/pre_option_(option_name) filter to override the “local” settings and use the value being stored in your “main” sub site. something like add_filter( ‘pre_option_the_plugin_option_name’, function () { // Code assumes that “blog” 1 is the main one in which the relevant settings are stored. if (get_current_blog_id() … Read more

Remove/unset options field from backend Settings->General?

Unfortunately, the html for those fields is hard-coded into the wp-admin/options-general.php file and there are no filters to keep them from being displayed. The next-best thing is probably to disable them. Here’s how I’d approach it: Step 1: Adding a bit of js/jQuery to the general options page that will target the inputs/selects you want … Read more

How does WordPress decide what template to use as frontpage

Front page template logic is horrendous legacy mess. While back I wrote a very thorough front page cheatsheet, I still can’t completely remember how it works. You are right to notice that theme in your case doesn’t behave in same way as other themes typically do. If you run down specific template being used (plugin … Read more

wp-admin pages return ERR_EMPTY_RESPONSE

https://core.trac.wordpress.org/ticket/42345 After a lot of digging and following segfaults in strace and parsing out apache core dumps (and enlisting some outside help from a much more knowledgeable Linux guy) I dug this up on WordPress’s site. The short answer to the problem is that there is an issue with PHP5 and libssh2 that was introduced … Read more

Moving WordPress.com theme and widget settings to self-hosted site?

First off, check if the theme is available in wordpress.org themes: http://wordpress.org/extend/themes/ If it’s not, find the name of the theme developer and contact them. Many developers of wordpress.com themes are happy for people to use their themes on self-hosted WordPress blogs. The developer’s name and contact details can be found by looking at style.css. … Read more

Is there a hook attached to general settings save?

You just need to register_setting() on your setting and it will be saved automatically. See the Settings API for more info. Here’s a complete example: function spw_cb() { if( !($value = get_option(‘sprockets_per_widget’)) ) { $value = 7; } ?> <input type=”text” size=”3″ name=”sprockets_per_widget” value=”<?php echo $value; ?>” /> Numeric only! <?php } function spw_init() { … Read more