How to create custom Widget for Custom Post Types

click here OR   class My_Widget extends WP_Widget { public function __construct() { $widget_ops = array('classname' => 'My_Widget', 'description' => 'Displays an My widget!' ); $this->WP_Widget('My_Widget', 'My widget', $widget_ops); } function widget($args, $instance) { // PART 1: Extracting the arguments + getting the values extract($args, EXTR_SKIP); $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); … Continue reading How to create custom Widget for Custom Post Types

Product inquiry woocommerce

<?php /* Plugin Name: Product inquire Version: 1.0 Author: Name Description: This pluging provide to product inquire */ function product_inquire_scripts() { wp_register_style( 'product-inquire-style', plugins_url('css/product-inquire.css', __FILE__) ); wp_enqueue_style( 'product-inquire-style' ); } add_action( 'wp_enqueue_scripts', 'product_inquire_scripts' ); /* Creating Menus */ function product_inquire_Menu() { /* Adding menus */ add_menu_page(__('Inquire List'),'Inquire List', 8,'proinq/inquirelist.php', 'inquire_list', "", 26); /* Adding Sub … Continue reading Product inquiry woocommerce

how to create plugin in wordpress

<?php /* Plugin Name: Group Management Description: Group (Agent) Management Plugin URI: Author URI: Author: Urmil License: Public Domain Version: 1.1 */ /** * PART 1. Defining Custom Database Table * ============================================================================ * to drop table and option */ /** * $qd_group_management_version - holds current database version * and used on plugin update to sync … Continue reading how to create plugin in wordpress