Skip to main content

Posts

Showing posts from July, 2020

How to create product slider in wordpress/Woo-commerce?

//Link js file with wordpress function enqueue_files(){ wp_enqueue_script( 'jquery', get_stylesheet_directory_uri() . '/js/jquery.min.js'); } add_action("wp_enqueue_scripts","enqueue_files"); <style> <!----------------- paste css in style.css file only -------------------> <!------------ in woocommerce product slide effect css -----------------> .outer_image_container { position: relative; } .show_box_effect { position: absolute; background: #2f2f2f; width: 80%; height: 1%; top: -80%; left: 0; right: 0; bottom: 0; margin: auto; transition: 0.5s all; z-index: -1; opacity: 0; display: flex; } ul.products li.product:hover .show_box_effect { position: absolute; background: #2f2f2f; width: 80%; height: 80%; top: 0; left: 0; right: 0; bottom: 0; margin: auto; transition: 0.5s all; z-index: 1; opacity: 1; display: flex; } a.custom_add_to_cart { background: none; text-align: center;

How to get posts with pagination in wordpress?

<?php  // Register Custom Post Type function schedule_post_type() {  $labels = array(   'name'                  => _x( 'schedule', 'Post Type General Name', 'text_domain' ),   'singular_name'         => _x( 'schedule', 'Post Type Singular Name', 'text_domain' ),   'menu_name'             => __( 'schedule', 'text_domain' ),   'name_admin_bar'        => __( 'schedule', 'text_domain' ),   'archives'              => __( 'Item Archives', 'text_domain' ),   'attributes'            => __( 'Item Attributes', 'text_domain' ),   'parent_item_colon'     => __( 'Parent Item:', 'text_domain' ),   'all_items'             => __( 'All Items', 'text_domain' ),   'add_new_item'          => __( 'Add New Item', 'text_domain' ),   &#

How to create wp_editor/Custom editor in wordpress/Woo-commerce?

Create wp_editor/Custom editor in wordpress/Woo-commerce. add_action("admin_init", "certifications"); add_action('save_post', 'save_subdescription'); function certifications(){ add_meta_box("sub_description", "Certifications", "meta_function", "product"); } function meta_function(){ global $post; $custom = get_post_custom($post->ID); $sub_description = $custom["sub_description"][0]; wp_editor( $sub_description, 'certifications', $settings = array('textarea_name'=>'sub_description','dfw'=>true) ); } function save_subdescription(){ global $post; update_post_meta($post->ID, "sub_description", $_POST["sub_description"]); } function show_certification_content(){ echo get_post_meta( get_the_ID(), 'sub_description', true ); //echo get_the_content(); } add_action('woocommerce_before_single_product_su

How to send email in wordpress?

Send email in wordpress. $contactfirstname ="lali"; // No need to make changes below this line.  $toadmin = "developwithjaspreet@gmail.com"; $adminmessage = 'You just got one visitor. Here is the detail below'; $noreply = 'noreply@jaspreet797386@gmail.com'; $headers = "From: " . $contactfirstname . "\r\n";             $headers .= "Reply-To: ". strip_tags($noreply) . "\r\n";             $headers .= "MIME-Version: 1.0\r\n";             $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $headers = 'From: "' . $contactfirstname . '" <no-reply@randhirstudsios.com>' . "\r\n"; wp_mail( $toadmin, $contactfirstname, $adminmessage, $headers );

How to send email after saving post in wordpress?

Send email after saving post in wordpress function action_publish_post( $ID, $post ) {  $contactfirstname ="Jassi"; // No need to make changes below this line.  $toadmin = "developwithjaspreet@gmail.com"; $adminmessage = 'You just got one visitor. Here is the detail below'; $noreply = 'noreply@jaspreet797386@gmail.com'; $headers = "From: " . $contactfirstname . "\r\n";             $headers .= "Reply-To: ". strip_tags($noreply) . "\r\n";             $headers .= "MIME-Version: 1.0\r\n";             $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $headers = 'From: "' . $contactfirstname . '" <no-reply@randhirstudsios.com>' . "\r\n"; wp_mail( $toadmin, $contactfirstname, $adminmessage, $headers ); }          // add the action  add_action( 'publish_contracts', 'action_publish_post&#

How To Disable or Block Inspect Element in Browser/Website?

Disable or Block Inspect Element in Browser/Website <body oncontextmenu="return false;"> </body> document.onkeydown = function(e) {   if(event.keyCode == 123) {      return false;   }   if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) {      return false;   }   if(e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) {      return false;   }   if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) {      return false;   }   if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) {      return false;   } }

How to create flipbook effect in single product page in woocommerce?

Create flipbook effect in single product page in woocommerce. Note :-> Enqueue these file and get from  Multiple Post Thumbnails plugin. After getting these files then you can deactivate plugin. Page in function.php file function enqueue_files(){ wp_enqueue_script( 'jquery', get_stylesheet_directory_uri() . '/js/jquery.min.js');  wp_enqueue_script("featured-image-custom", get_stylesheet_directory_uri(). '/js/multi-post-thumbnails-admin.js'); } add_action("wp_enqueue_scripts","enqueue_files"); add_theme_support( 'post-thumbnails' ); add_image_size( 'feature-image', 960, 500, true ); // Define additional "post thumbnails". Relies on MultiPostThumbnails to work if (class_exists('MultiPostThumbnails')) {     new MultiPostThumbnails(array(         'label' => '2nd Feature Image',         'id' => 'feature-image-2',         'p

How to create second select featured image in add product page in woocommerce

Note :-> Enqueue these file and get from  Multiple Post Thumbnails plugin. After getting these files then you can deactivate plugin. Page in function.php file function enqueue_files(){ wp_enqueue_script( 'jquery', get_stylesheet_directory_uri() . '/js/jquery.min.js'); wp_enqueue_style( 'custom-elementor-style', get_stylesheet_directory_uri() . '/widgets/custom-elementor-style.css');  wp_enqueue_script("featured-image-custom", get_stylesheet_directory_uri(). '/js/multi-post-thumbnails-admin.js');   } add_action("wp_enqueue_scripts","enqueue_files"); add_theme_support( 'post-thumbnails' ); add_image_size( 'feature-image', 960, 500, true ); // Define additional "post thumbnails". Relies on MultiPostThumbnails to work if (class_exists('MultiPostThumbnails')) {     new MultiPostThumbnails(array(         'label' => '2nd Feature Image',  

How to remove and add new functionality in woocommerce product thumbnails on single product page?

 Remove and add new functionality in woocommerce product thumbnails on single product page. remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );  remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 ); add_action( 'woocommerce_product_thumbnails', 'show_my_flip_book', 20 );  add_action( 'woocommerce_before_single_product_summary', 'show_my_flip_book', 10 ); 

How to create flipbook effect in html/css and jquery?

Create flipbook effect in html/css and jquery. <script> function initGoodies() { jQuery(".see-back").on("click", function () { jQuery(this).parents(".book-images").find(".book").toggleClass("back-view"); }); } jQuery(document).ready(function ($) { initGoodies(); }); </script> <div class="product-overview__image"> <div class="book-images"> <div class="book"> <img width="300" height="457" src="https://demo2.tokomoo.com/livre/wp-content/uploads/sites/16/2017/06/book-1-300x457.jpg" class="placeholder wp-post-image" alt="" srcset="https://demo2.tokomoo.com/livre/wp-content/uploads/sites/16/2017/06/book-1-300x457.jpg 300w, https://demo2.tokomoo.com/livre/wp-content/uploads/sites/16/2017/06/book-1-197x300.jpg 197w, https://demo2.tokomoo.com/livre/wp-content/uploads/sites/16/2