Skip to content

Instantly share code, notes, and snippets.

@accrane
accrane / function-move-yoast-to-bottom.php
Last active July 7, 2016 19:31
Move Yoast SEO box to the bottom of the page
/*-------------------------------------
Move Yoast to the Bottom
---------------------------------------*/
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');
@accrane
accrane / custom-flexslider-images-loaded.js
Created January 5, 2017 16:34
Load Flexslider with Images loaded function
$('.flexslider').imagesLoaded( function() {
$('.flexslider').flexslider({
animation: "fade",
slideshowSpeed: 5000,
smoothHeight: true,
}); // end register flexslider
});
@accrane
accrane / custom-flexslider-carousel.js
Created January 18, 2017 18:40
Responsive call to a flexslider carousel
@accrane
accrane / change-first-word.js
Created March 6, 2017 16:17
jQuery solution to changing the styling of the first word
/*
*
* Make first word in date underlined
*
------------------------------------*/
$('.js-first-word').each(function(index, element) {
var heading = $(element);
var word_array, last_word, first_part;
word_array = heading.html().split(/\s+/); // split on spaces
@accrane
accrane / google-captcha-v2.html
Created April 14, 2017 19:01
Google Captcha V2 page setup
<!DOCTYPE html>
<html>
<head>
<title>Google Captcha v2</title>
<script type="text/javascript" language="JavaScript">
// Callback to get the button working.
function enableBtn1(){
document.getElementById("button1").disabled = false;
@accrane
accrane / google-captcha-form.html
Created April 14, 2017 19:08
the form setup for Google Captcha V2
<div class="form-wrap">
<!-- Form 1 -->
<form id="form-1">
<!--
Other form elements...
-->
<!-- insert the google captcha div with the ID of "recaptcha1" -->
<div id="recaptcha1" class="googlecapt"></div>
<!-- Give your submit button an ID of "button1" -->
@accrane
accrane / google-captcha-render.html
Created April 14, 2017 19:12
rendering the Google Captcha
<script type="text/javascript" language="JavaScript">
// Call to rendor the captcha
var recaptcha1;
var recaptcha2;
var myCallBack = function() {
//Render the recaptcha1 on the element with ID "recaptcha1"
recaptcha1 = grecaptcha.render('recaptcha1', {
//'sitekey' : '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI', //test key
'sitekey' : 'YOUR_SITE_KEY', // production
@accrane
accrane / google-captcha-enable-submit.html
Created April 14, 2017 19:18
enables submit button
<script type="text/javascript" language="JavaScript">
// Callback to get the button working.
function enableBtn1(){
document.getElementById("button1").disabled = false;
}
function enableBtn2(){
document.getElementById("button2").disabled = false;
}
</script>
<script type="text/javascript">
jQuery(document).ready(function ($) {
// disable the button until successfull google captcha
document.getElementById("button1").disabled = true;
document.getElementById("button2").disabled = true;
})(jQuery);
</script>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]