Posts

Showing posts from March, 2018

How to create a custom form in wordpress

// create table in database ( must add prefix ) // create page to display form i was wrote code into front-page.php                       Name: Email Selecet Resume: Submit if(isset($_POST['submitted'])) { global $wpdb; //print_r($_FILES['res']); $filename =  basename($_FILES['res']['name']); $path = get_template_directory()."/"."upload/resume/".$filename; //echo " "; $status = false; if(move_uploaded_file($_FILES['res']['tmp_name'], $path)) { $status = ture; } if($status == true) { $tablename=$wpdb->prefix.'resume'; $date = date("Y-m-d H:i:s A"); $data=array('name' => $_POST['contactName'], 'email

How to create Custom Menu in wordpress admin panel

// Create a file under the theme folder Yourname.php /* How to add menu into the admin */ add_action('admin_menu', 'my_menu_pages'); function my_menu_pages(){     add_menu_page('Show Recodes',  // page name         'View Resume',  // menu name         'manage_options',  // not change         'Second-menu',  //  Page is display to admin panel it is display in url         'my_menu_output', // function name         'dashicons-welcome-view-site', // icon url or icon name          3          /*             where to display             Default: bottom of menu structure #Default: bottom of menu structure             2 – Dashboard             4 – Separator             5 – Posts             10 – Media             15 – Links             20 – Pages             25 – Comments             59 – Separator             60 – Appearance             65 – Plugins             70 – Users             75 – Tools