How to make a can’t hide widget?

to block the ablility to hide it, you can use that : const WIDGET_TO_SHOW = “example_dashboard_widget”; add_filter(“get_user_option_metaboxhidden_dashboard”, function ($result, $option, $user) { $result = array_diff($result, [WIDGET_TO_SHOW]); return $result; }, 10, 3); this is just server side. to be more clear for the user, you can use JavaScript to hide the checkbox in “screen options”.

Widgets in home.php redirect to index.php

You can change that behavior using template_include filter, but you shouldn’t do that… The main problem in here is that you use a static page as home and then, I guess, you use some custom WP_Query in it. It isn’t very good idea. If you are showing posts on home page and want to modify … Read more

How to make my custom widget appear within WordPress widgets? Plugin development

Updated my answer based on your comments. First of all; Please read how to create a plugin: https://codex.wordpress.org/Writing_a_Plugin Secondly, create a folder and your file in the wp-content/plugins directory. Add this sample plugin code below. After that please activate the plugin from Dashboard. old answer When you register widget as a plugin you need to … Read more