Set Home Page without using static home page
Create your own php page with title home.php
upload to your theme
Go to setting-->Reading-->Set static front page as latest posts
Get current user ID
https://codex.wordpress.org/Function_Reference/get_current_user_id
get_current_user_id();
Custom Select
global $wpdb;
$query = "select query";
$result = $wpdb->get_results($query);
foreach($result as $row)
{
$row->columnname;
}
Custom Insert
global $wpdb;
if(isset($_POST['btnUpdate']))
{
$tablename = 'wp_rwcasesassignment';
date_default_timezone_set('Asia/Kolkata');
$date= Date('Y-m-d H:i:s');
$data = array(
'caseid' => $_POST["hdnordid"],
'userid' => $_POST["resumewriters"],
'assignedon' => $date );
if($wpdb->insert($tablename, $data))
{
//success
}
}
If category based menu not working for a post then do this
1. Go to Settings-->Permalinks-->Category Base = %category%
Restrict menu based on role
Download plug-in Menu Item Visibility Control. Then you will see Visibility option in the menu Item. Place logic.
For example, below code can be written to restrict menu should show only to admin
Menu Item Visibility Control in_array('administrator', $GLOBALS['current_user']->roles)
https://wordpress.org/plugins/menu-items-visibility-control/
How to enable registration page in woocommerce
By default registration isn't enabled in woocommerce. Go to woocommerce-->Accounts-->Enable registration