How to show data by live search from mysql database using ajax?

Show data by live search  from mysql database using ajax //html form <form method=”post”> <h5> SEARCH FOR USERS </h5> <input type=”text” id=”search” name=”search” placeholder=”search”> <!– <input type=”submit” name=”sechsub” value=”Search”> –> </form> <div id=”result”> </div> // jquery code <script> jQuery(document).ready(function($){ $(“#search”).keyup(function(){ //alert(“srchval”); var srchval = $(this).val(); var datas = { ‘action’:’search_form’, ‘srchval’:srchval, } $.post(myajax.ajaxurl,datas,function(response){ console.log(response); $(“#result”).html(response); […]

How to display custom meta box in wordpress?

Display custom meta box in wordpress First generate meta box code and then add this code where you want to display – <?php $custom_meta_data = get_post_meta( get_the_ID(),’custom_meta_box_id_’ ,true); ?> <?php echo $custom_meta_data; ?> // here custom_meta_box_id_ is the meta box field id  

How to use pagination in wp_query in wordpress ?

Use pagination in wp_query in wordpress Best Way of getting pagination in wp_query is – <?php $paged = get_query_var(‘paged’); $args = array( ‘cat’ => 1, ‘posts_per_page’ => 5, ‘paged’ => $paged, ); $bolly_post = new WP_Query($args); if ( $bolly_post->have_posts() ) : while ( $bolly_post->have_posts() ) : $bolly_post->the_post(); ?> <a href=”<?php echo get_the_permalink(get_the_ID())?>”><?php echo the_post_thumbnail()?></a> <p […]

A responsive nav bar source code using html and css only

A responsive nav bar source code using html and css only //Html code <html> <head> <title>WPDEVKIT | Test responsive header</title> <link rel=”stylesheet” href=”style.css” type=”text/css”> <script src=”https://kit.fontawesome.com/a076d05399.js”></script> </head> <body> <nav> <input class=”bar” type=”checkbox” id=”check”> <label for=”check” class=”checkbtn”><i class=”fas fa-bars”></i></label> <label class=”branding”>WPDEVKIT</label> <ul class=”nav_item”> <li class=”nav_item_list”><a href=”#” class=”active”>Home</a></li> <li class=”nav_item_list”><a href=”#”>Bolly</a></li> <li class=”nav_item_list”><a href=”#”>Holly</a></li> <li class=”nav_item_list”><a href=”#”>Dubbed</a></li> […]

How to set cookie in php?

Set cookie in php setcookie(‘otp’, $otp, time()+62208000, ‘/’, $_SERVER[‘HTTP_HOST’]); //otp is the cookie name here  

How to send otp and verify it (in wordpress)?

Send otp and verify it (in wordpress) //send otp part <div class=”container”> <center> <h4>Enter Mobile Number</h4> <form method=”post” action=””> <input type=”text” class=”fullrow” name=”phone” placeholder=”Enter phone no.” > <span class=”error” style=”display:none”></span> <input class=”submit” type=”submit” value=”Get OTP” name=”sotp”> </form> </center> </div> <span class=”success” style=””></span> <script> jQuery(document).ready(function($){ $(“.submit”).click(function(e){ e.preventDefault(); var number = $(“.fullrow”).val(); //alert(number); var data = { […]