This file contains hidden or 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
# my local and production sites use /blog/ as a directory for WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} ^/blog/wp-content/uploads/[^\/]*/.*$ | |
RewriteRule ^(.*)$ https://www.example.com/blog/$1 [QSA,L] | |
</IfModule> | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On |
source: https://timmyomahony.com/blog/MAMP-phpmyadmin-and-big-database-imports-errors-or-timeouts/
-
Create the database and database user phpMyAdmin as usual.
-
Connect to mysql by running the following command from the directory where the dump file was stored:
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
This file contains hidden or 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
/** | |
* Document ready loads when the browser has passed from the top all the way to the bottom | |
*/ | |
// Standard | |
$(document).ready(function(){ | |
}); | |
// Shorthand | |
$(function(){ | |
}); |
This file contains hidden or 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
$('.home_banner').slick('slickPause'); |
This file contains hidden or 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
$(object).trigger('stop.owl.autoplay'); |
This file contains hidden or 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
jQuery: Clone an existing jQuery function | |
``` | |
var staticButton = $(".sticky-footer--wrapper button").clone().addClass("payment-button"); | |
$(".cart-info.delivery-payment-sidebar").append(staticButton); | |
``` |
This file contains hidden or 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
<?php | |
// Add a shorcode to get the template part | |
function makeagency_shortcode() { | |
ob_start(); | |
get_template_part('templates/this', 'template'); | |
return ob_get_clean(); | |
} | |
add_shortcode( 'tax_calculator', 'makeagency_shortcode' ); | |
// Check the post for the shortcode and enque the scripts |