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
<?php | |
/* | |
* Add custom spacing (margin and padding) controls to Elementor's Column_Element and Section_Element | |
* This hook means "run this function before you add the control section named 'section_advanced' on | |
* the element 'column' or 'section'. | |
*/ | |
add_action( 'elementor/element/column/section_advanced/before_section_start', 'add_custom_spacing_controls' ); | |
add_action( 'elementor/element/section/section_advanced/before_section_start', 'add_custom_spacing_controls' ); | |
/** |
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
<?php | |
/** | |
* Add checkbox field to the checkout | |
**/ | |
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field'); | |
function my_custom_checkout_field( $checkout ) { | |
echo '<div id="my-new-field"><h3>'.__('My Checkbox: ').'</h3>'; |
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
//the next few lines strip "or Create an Account" from the log-in menu option | |
//I usually set the overall navigation to display:none; in my CSS if I know js is enabled | |
//I use Modernizr and check for the js class on the <html> tag with the style selector for my menu | |
//like: .js #navigation { display: none; } | |
//You'll want to add a class or ID to the <div> containing the log-in/log-out link | |
//usual output (with added ID): | |
//<li> | |
// <div id="log_in_options"> | |
// <a onclick="" href="[url]">Sign in</a> or <a onclick="" href="[url]">Create an account</a> |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |