Unable to link CSS file

First you need to register the style and css using wp_register_script() and wp_register_style() functions //registering css wp_register_style ( ‘mysample’, plugins_url ( ‘css/MapStyle.css’, __FILE__ ) ); wp_register_script ( ‘mysample’, plugins_url ( ‘js/MapStyle.js’, __FILE__ ) ); After this you can call the wp_enqueue_style() functions for loading the css in required page wp_enqueue_style(‘mysample’); wp_enqueue_script(‘mysample’);

How to display archive by selecting year and then selecting month

Unfortunately there is no way to nest wp_get_archives to achieve this, so you will have to build your own loop using get_month_link Like this (untested, regard this as a starting point): $year = 2009; while ($year =< get_the_time(‘Y’)) { echo ‘<ul>’ $month = 1; while ($month =< 12) { $link = get_month_link ($year, $month); if … Read more

Unable to show a message after plugin activation

<?php /* Plugin Name: Activation Description: This display notice message test plugin Author: Nanhe Kumar Version: 1.0 Author URI: http://nanhe.in/ */ class Activation { public static function init() { add_action(‘admin_notices’, array(__CLASS__, ‘text_admin_notice’)); } public static function text_admin_notice() { ?> <div class=”notice notice-success is-dismissible”> <p> TEST MESSAGE</p> </div> <?php } } add_action(‘init’, array(‘Activation’, ‘init’)); Your message … Read more

Plugin MySQL SELECT custom data and filter on user meta

Without a proper SQL query in the question is not possible to write a proper query in the response, but following your pseudo-code approach: SELECT custom-data FROM custom-table LEFT JOIN wp_users ON custom_data.user_id = wp_users.ID LEFT JOIN wp_usermeta ON wp_users.ID = wp_usermeta.user_id WHERE some-condition AND wp_usermeta.meta_key = ‘flag’ AND wp_usermeta.meta_value=”flagvalue” So basically, you need to … Read more