Skip to content

Instantly share code, notes, and snippets.

View ericakfranz's full-sized avatar

Erica Franz ericakfranz

View GitHub Profile
@ericakfranz
ericakfranz / om-custom-redirect.js
Created December 3, 2015 16:19
Redirect the visitor to a specific URL when any optin is exited or successfully submitted.
jQuery(document).ready(function($){
function omRedirect() {
var url = "http://optinmonster.com";
$(location).attr('href',url);
}
$(document).on('OptinMonsterOptinSuccess', function(event, data, object){ omRedirect(); });
$(document).on('OptinMonsterOnClose', function(event, data, object){ omRedirect(); });
});
@ericakfranz
ericakfranz / envira-lightbox-self-hosted-video.html
Last active December 2, 2015 21:15
Example of link for loading self-hosted video in Envira's lightbox when using https://gist.github.com/ericakfranz/a470a198f3f4758c2f2c
<a href="http://example.com/wp-content/uploads/2015/12/video.mp4" data-envirabox-type="iframe">
<img src="http://example.com/wp-content/uploads/2015/12/image.jpg" alt="" height="" width="" />
</a>
@ericakfranz
ericakfranz / envira-pagination-css.css
Last active December 2, 2015 20:48
Envira Gallery Pagination CSS Structure
/* Pagination Container */
.envira-gallery-wrap .envira-pagination {
margin: 0 0 20px 0;
}
/* Current Page Item */
.envira-gallery-theme-subtle .envira-pagination span.current {
}
@ericakfranz
ericakfranz / envira-lightbox-custom-images.php
Last active November 20, 2018 22:38 — forked from n7studios/envira-lightbox-custom-images.php
Envira Gallery - Lightbox for Custom Images
<?php
/**
* Plugin Name: Envira Gallery - Lightbox for Custom Images
* Plugin URI: http://enviragallery.com
* Version: 2.0
* Author: Erica Franz
* Author URI: https://fatpony.me/
* Description: Use the Envira Gallery lightbox for non-gallery images throughout your site.
*/
@ericakfranz
ericakfranz / om-custom-error-messages.js
Created December 1, 2015 16:56
Customize the error messages shown for the email and name input fields for OptinMonster when using any native Email Service Provider integration. Can be used to translate the message shown as well.
jQuery(document).ready(function($){
jQuery(document).on('OptinMonsterBeforeShow', function(event, props, object) {
object.setProp('email_error', 'Replace this text with your custom email field error message');
object.setProp('name_error', 'Replace this text with your custom name field error message');
});
});
@ericakfranz
ericakfranz / soliloquy-video-play-icon.css
Created November 30, 2015 21:54
Modify the default play icon for Soliloquy Video Slides
.soliloquy-container .soliloquy-video-icon {
background-image: url('http://www.example.com/image.png') !important;
background-size: 50% 50% !important;
}
/* Retina version */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min--moz-device-pixel-ratio: 2),
only screen and (-o-min-device-pixel-ratio: 2 / 1),
only screen and (min-device-pixel-ratio: 2),
@ericakfranz
ericakfranz / om-image-nopin-attribute.js
Last active March 22, 2016 15:59
Add the data-pin-nopin attribute to popup optin images to exclude them from Pinterest share options. https://developers.pinterest.com/docs/widgets/pin-it/#nopin
jQuery(document).ready(function($) {
$(document).on('OptinMonsterLoaded', function(event, data, object){
$('#om-' + data.optin + ' img').attr('data-pin-nopin', 'true');
});
});
@ericakfranz
ericakfranz / om-hover-element-trigger-optin.js
Created November 27, 2015 20:53
Trigger a click on a specific MonsterLink when hovering over a specific element on the page.
jQuery(document).ready(function($){
$('.content').live('mouseover', function() { // When hovering over any element with the '.content' class - change as you require
$('.manual-optin-trigger[data-optin-slug=u6mkwuqm0xf6g94d]').trigger('click'); // Change 'u6mkwuqm0xf6g94d' to match your specific optin slug
});
});
@ericakfranz
ericakfranz / om-hover-external-link-trigger-optin.js
Created November 27, 2015 20:51
Trigger a click on a specific MonsterLink when hovering over any link containing the rel="external" attribute.
@ericakfranz
ericakfranz / om-hover-monsterlink-trigger-optin.js
Created November 27, 2015 20:41
Trigger a click on a MonsterLink when hovered over.