WordPress
October 5, 2021

Upload Video or Image in WordPress Media Library

When we use custom form with file upload and we want to upload Video or Image in wordpress media library use following code.

$array) {
if ($_FILES[$file][‘error’] !== UPLOAD_ERR_OK) {
return “upload error : ” . $_FILES[$file][‘error’];
}
$attach_id = media_handle_upload( $file, 0 );
}
}
}

?>

Related Post


WordPress Login Form Without Plugin

Are you need simple login form without plugin for your WordPress website? Yes, Then i have created [wc_login_form] shortcode with quick simple code. So you can put login form anywhere like in Pages, Posts and Widget etc… Therefore you just need to put [wc_login_form] shortcode where you need login form. So you need to follow […]

WordPress htaccess

The .htaccess is a distributed configuration file, and is how Apache handles configuration changes on a per-directory basis. Basic WP Multisite Subfolder Example SubDomain Example

Get product details from $product object WooCommerce

I am publish this article for get values from WooCommerce $product object. You can get all information of product from $product object. When we have $product object. Get $product object by $product_id. Get $order object by $order_id. Get products from $cart object.

WordPress Change Password Form Without Plugin

Are you need simple Change Password form without plugin for your WordPress website? Yes, Then i have created [wc_change_pwd_form] shortcode with quick simple code. So you can put Change Password form anywhere like in Pages, Posts and Widget etc… Therefore you just need to put [wc_change_pwd_form] shortcode where you need Change Password form. So you […]

WordPress Forgot Password Form Without Plugin

Are you need simple Forgot Password form without plugin for your WordPress website? Yes, Then i have created [wc_forgot_pwd_form] shortcode with quick simple code. So you can put Forgot Password form anywhere like in Pages, Posts and Widget etc… Therefore you just need to put [wc_forgot_pwd_form] shortcode where you need login form. So you need […]

Create Custom Repeater Control Elementor

Easy way to create Repeater control widget for Elementor. Create wc-custom-post-widget.php file and include its to functions.php file(This file is located in your theme folder). You can use below code to include file wc-custom-post-widget.php. include 'wc-custom-post-widget.php'; Elementor has a special type of control called a Repeater, which can contain other controls.Repeaters create sub-items that are […]


Leave a Reply

Your email address will not be published. Required fields are marked *