We provide knowledgeable blogs related to php, jQuery, html, css, wordpress, woocommerce, cordova app with examples in 2021.
05 June 2020
How to logout on any page after woocommerce and wordpress Logout?
Logout on any page after woocommerce and wordpress Logout
add_action('wp_logout','ps_redirect_after_logout');
function ps_redirect_after_logout(){
wp_redirect( 'your url here' );
exit();
}
04 June 2020
How to get user is login or not login in woocommerce and wordpress?
User is login or not login in woocommerce and wordpress
if ( is_user_logged_in() ) {
// echo '<script>alert("your are login");</script>';
} else {
}
How to get page name from url in php?
Get page name from url in php.
$slug = basename(get_permalink());
How to run jquery after page is fully loaded in background?
Run jquery after page is fully loaded in background
jQuery(document).ready(function($) {
$(window).load(function() {
//insert all your ajax callback code here.
//Which will run only after page is fully loaded in background.
});
});
How to get value from url after question mark in php?
How to PHP Request uri get string parts after question mark?
$parts = explode("?", $_SERVER[REQUEST_URI]);
echo $parts[1];
02 June 2020
How to create custom popup in html, css and jQuery?
Create custom popup in html, css and jQuery
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<style>
body{
margin:0px;
padding:0px;
}
.outer_quick_view_box {
width: 100%;
height: 100vh;
background: rgba(0, 0, 0, 0.46);
justify-content: center;
display: none;
align-items: center;
position: fixed;
top: 0px;
right: 0px;
left: 0px;
bottom: 0px;
}
.quick_view_box{
width:70%;
height:70vh;
background:white;
}
.quick_view_close_bt {
color: #565454;
position: absolute;
top: 0px;
right: 0;
background: white;
border: 1px solid #8a8a8a;
border-radius: 50%;
padding: 11px;
margin: 40px;
cursor: pointer;
}
.quick_view_half_sec{
width:50%;
height:auto;
float:left;
}
</style>
<script>
jQuery(document).ready(function($){
$('.quick_view_close_bt').click(function(){
$('.outer_quick_view_box').hide();
});
$('.show_quick_view_bt').click(function(){
$('.outer_quick_view_box').show();
$('.outer_quick_view_box').css('display','flex');
});
});
</script>
</head>
<body>
<button class="show_quick_view_bt" >click me</button>
<div class="outer_quick_view_box" >
<div class="quick_view_close_bt">X</div>
<div class="quick_view_box">
</div>
</div>
</body>
</html>
Subscribe to:
Posts (Atom)
How to add re-captcha v3 on all Elementor forms using coding?
Add re-captcha v3 on all Elementor forms using coding add_action('wp_footer',function(){ ?> <script src="https://www...
-
Preview doc or docx file in html/iFrame var link = "paste docx file link here"; var iFrameUrl = 'https://view.officeapps.live....
-
Add re-captcha v3 on all Elementor forms using coding add_action('wp_footer',function(){ ?> <script src="https://www...
-
< html > < head > < script src = "https://maps.googleapis.com/maps/api/js?key=AIzaSyBcRA4LijSY8e-FG4lN1sTYCha...