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
@media screen and (max-width:767px){ | |
body .elementor-widget-n-menu .e-n-menu[data-layout=dropdown] .e-n-menu-toggle[aria-expanded=false]+.e-n-menu-wrapper { | |
left:100vw; | |
transition:left 0.3s ease-in-out; | |
display:flex; | |
max-height:unset; | |
} | |
body .elementor-widget-n-menu .e-n-menu[data-layout=dropdown] .e-n-menu-toggle[aria-expanded=true]+.e-n-menu-wrapper { | |
left:-40px; | |
transition:left 0.3s ease-in-out; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>title</title> | |
<style> | |
button { | |
appearance: none; | |
background-color: transparent; |
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 | |
/* | |
This is a quick a dirty way of saving JupiterX form submissions to your database, similar to how you can save the Elementor Pro ones. | |
I like the Jupiter X form widget because I work with its Hubspot action a lot, which Elementor Pro doesn't have. However the lack of local save sucks. | |
It seemed easier to implement saving submissions in the JX widget than Hubspot in the EPro one. | |
*/ | |
//Include the action class. You can save it where you want and adjust the path below | |
include_once(get_stylesheet_directory() . '/inc/localsave.php'); |
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 | |
//change the image size used in thumbnails | |
add_filter( 'woocommerce_get_image_size_gallery_thumbnail', function( $size ) { | |
return array( | |
'width' => 300, | |
'height' => 200, | |
'crop' => 1, | |
); |
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 | |
//replace my_taxonomy with your own taxonomy slug | |
//The hook create_{$taxonomy} is fired when terms are created in $taxonomy | |
function my_taxonomy_meta_add($term_id, $tax_term_id){ | |
//here you can add whatever meta you need | |
add_term_meta($term_id,'_date_created',time()); | |
} | |
add_action('create_my_taxonomy','my_taxonomy_meta_add',10,3); |
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
//Based on https://community.cloudflare.com/t/geoip-redirection-worker/14414 | |
//This assumes you have region-specific sites set up like so | |
//www.company.com - global landing page where this worker runs | |
//www.company.com/us/ | |
//www.company.com/au/ | |
//in our case we are only changing paths/dubdirectories, not domains. Map country codes to subdirectories. |
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 | |
//bootstrap WP | |
require_once('wp-load.php');//I have this file saved in the site root | |
$stores = get_posts([ | |
'post_type' => 'wpsl_stores', | |
'posts_per_page' => -1, | |
'post_status' => 'any' | |
]); |
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 | |
function example_admin_bar_settings($settings){ | |
//print_r($settings); | |
foreach($settings['elementor_edit_page']['children'] as $id => $item){ | |
//$id is the post id, perform whatever checks you want | |
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
# Points to note: | |
# 1. Elementor data is saved as JSON in wp_postmeta with meta_key _elementor_data | |
# 2. The LIKE operator needs four backslashes for every one in the JSON data you are looking for. | |
# 3. The REPLACE function needs two backslashes for every one in the find / replace strings. | |
# 4. Eg: Searching for buttons with a particular label and linking to "/" - I want to change their links to /case-studies | |
update `wp_3_postmeta` set meta_value = REPLACE(meta_value, '"button_label":"View All","button_link":"\\/','"button_label":"View All","button_link":"\\/case-studies') WHERE meta_key = '_elementor_data' AND meta_value LIKE '%"button_label":"View All","button_link":"\\\\/"%'; |
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
div#hs-eu-cookie-confirmation div#hs-eu-cookie-confirmation-inner { display:flex; align-items:center;justify-content:space-between;} | |
body div#hs-eu-cookie-confirmation div#hs-eu-cookie-confirmation-inner div#hs-eu-policy-wording { margin-bottom:0;padding-right:30px;} | |
body div#hs-eu-cookie-confirmation div#hs-eu-cookie-confirmation-inner div#hs-eu-policy-wording p { margin:10px 0;} | |
body div#hs-eu-cookie-confirmation div#hs-eu-cookie-confirmation-inner div#hs-en-cookie-confirmation-buttons-area { margin-top:0 !important; } |
NewerOlder