Create custom fields on a post

I would add my Custom Post Type (Person). You can do this with register_post_type function. Then you have to add your custom fields. And the easiest way to do this will be Advanced Custom Fields plugin. It allows you to define additional custom field groups that will be added to posts (based on some rules). … Read more

How to include css for plugin setting page? [duplicate]

Refer documentation Link Scripts Only on a Plugin Administration Screen add_action( ‘admin_menu’, ‘my_plugin_admin_menu’ ); function my_plugin_admin_menu() { /* Add our plugin submenu and administration screen */ $page_hook_suffix = add_submenu_page( ‘edit.php’, // The parent page of this submenu __( ‘My Plugin’, ‘myPlugin’ ), // The submenu title __( ‘My Plugin’, ‘myPlugin’ ), // The screen title … Read more

how to load a file from a plugin when a url is passed

I ended up answering my own question by using the following code add_filter( ‘template_include’,’include_filter_template_function’, 1 ); function include_filter_template_function($template_path ) { $template_path = plugin_dir_path( __FILE__ ) .’filter.php’; return $template_path; } and checking the params on that page. I’m sure there is a more elegant way to do this but it works for me. 🙂

In my plugin when i call select page is blank

You are missing to load files that will make $wpdb and other WordPress function available in the context. You can include some php files to emulate the WordPress context include_once(‘../../../wp-config.php’); include_once(‘../../../wp-load.php’); include_once(‘../../../wp-includes/wp-db.php’); $data = $wpdb->get_results(“SELECT * FROM ” . $table_prefix . “posts”); var_dump($data);

Non english charcters support for WP Customer Reviews

This an encoding compatibility problem that occurs when there is a discrepancy between wordpress encoding configuration and the default system or server configuration. The plugin creates tables like so: $sql = “CREATE TABLE $this->dbtable ( …. Code …. reviewer_name varchar(150) DEFAULT NULL, …. More table fields Code .. )”; The DEFAULT keyword is the culprit … Read more