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
<!-- Add before closing <body> tag --> | |
<script> | |
tarteaucitron.user.analyticsUa = 'UA-XXXXXXXX-XX'; | |
tarteaucitron.user.analyticsMore = function () { ga('set', 'anonymizeIp', true); ga('set', 'forceSSL', true); }; | |
(tarteaucitron.job = tarteaucitron.job || []).push('analytics'); | |
</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
<?php | |
// Add inline javascript before </head> | |
add_action( 'wp_head', 'header_inline_script' ); | |
function header_inline_script() { | |
?> | |
<script> | |
</script> | |
<?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
// Scroll to top | |
jQuery('html, body').animate({ scrollTop: 0 }, 1000); | |
// Scroll to element | |
jQuery('html, body').animate({ scrollTop: jQuery('#element').offset().top }, 1000); | |
// Scroll and center element on screen | |
jQuery('html, body').animate({ scrollTop: jQuery('#element').offset().top - jQuery(window).height()/2 - 100 }, 1000); |
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
add_action('wp_head','gtm_head', 20); | |
function gtm_head() { | |
?> | |
<!-- Google Tag Manager --> | |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
})(window,document,'script','dataLayer','GTM-XXXXXX');</script> | |
<!-- End Google Tag Manager --> |
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 | |
$items = get_field('FIELD_NAME'); | |
if( $items ): ?> | |
<ul> | |
<?php foreach( $items as $item ): ?> | |
<li><?php echo $item; ?></li> | |
<?php endforeach; ?> | |
</ul> |
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
jQuery("h1, h2, h3, h4, h5, h6").each(function() { | |
jQuery(this).html(function(index, text) { | |
return text.replace( /([',.;:?!])/g, '<span class="special">$1</span>' ); | |
}); | |
}); |
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
:root { | |
--columns-gap: 1rem; | |
} | |
@media (min-width:782px) { | |
.wp-block-column:not(:first-child) { | |
margin-left: var(--columns-gap); | |
} | |
} | |
@media (min-width:600px) and (max-width:781px) { |
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 | |
/* WARNING: Advanced SQL table modifications, USE AT YOUR OWN RISKS */ | |
/* IMPORTANT: You need to RESIGN SHORTCODES after executing this script */ | |
global $wpdb; | |
$sql = 'SELECT meta_id, meta_value | |
FROM ' . $wpdb->postmeta . ' | |
WHERE meta_key = "ct_builder_shortcodes"'; |
OlderNewer