how to disable jetpack for non admins?

Use the code given below, In this code we are checking if page is ‘jetpack’ and based on that showing custom error message. add_action( ‘admin_init’, ‘restrict_page’ ); function restrict_page() { if ( class_exists( ‘Jetpack’ ) && !current_user_can( ‘manage_options’ ) ) { if ( isset( $_GET[‘page’] ) && $_GET[‘page’] == ‘jetpack’ ) { wp_die( ‘no access’ … Read more

Jetpack Mobile Theme: when on smartphone on categories the theme suddenly changes to jetpack mobile theme even though it’s deactivated

This is because you most likely need to clear your cache. If you have any plugins like WP Super Cache or WP Fastest Cache installed then navigate to there settings and click clear all cache. Also if you have CloudFlare (or something similar) running on your website then you can purge the cache on that.

basic wordpress api endpoint to serve a key-value dictionary

You could create your own WP REST API endpoint that handles this. To register a custom endpoint: add_action( ‘init’, ‘bootstrap_api’ ); function bootstrap_api() { add_action( ‘rest_api_init’, ‘my_api_endpoint’ ); } function my_api_endpoint() { register_rest_route(‘myapi/v1’, ‘get/words’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘return_word_list’, ) ); } function return_word_list() { // Do someting to build your list of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)