Skip to content

Instantly share code, notes, and snippets.

Avatar
😃

David Wells DavidWells

😃
View GitHub Profile
View jquery-append-to-example.js
jQuery(document).ready(function($) {
jQuery('#lp_container').appendTo('.right-sidebar-wrapper');
});
@DavidWells
DavidWells / landing-page-config-example.php
Created Feb 1, 2014
This is a demo template for developers and designers to use as a reference for building landing page templates for the free Wordpress Landing Pages Plugin http://wordpress.org/plugins/landing-pages . See full demo template here: https://github.com/inboundnow/landing-pages/tree/master/templates/demo
View landing-page-config-example.php
<?php
/**
* WordPress Landing Page Config File
* Template Name: Demo Template
* @package WordPress Landing Pages
* @author Inbound Now
*
* This is a demo template for developers and designers to use as a reference for building landing page templates
* for Wordpress Landing Pages Plugin http://wordpress.org/plugins/landing-pages/
*
View hiring-odesk-developer-example.txt
Hi,
We need an HTML landing page converted to a WordPress Landing Pages Plugin template.
Application Requirements:
- Theming &amp; coding experience with WordPress.
- Experience with PHP, CSS, jQuery, HMTL.
- Understanding of WordPress Landing Pages plugin and how to create custom landing page templates.
Job Requirements:
@DavidWells
DavidWells / enable-mailchimp-double-opt-in.php
Last active Aug 29, 2015
Enable Double-Optin for InboundNow’s MailChimp Extension.
View enable-mailchimp-double-opt-in.php
<?php
add_filter('inboundnow_mailchimp_args','mc_enable_double_opt');
function mc_enable_double_opt( $args ) {
$args['double_optin'] = true;
return $args;
}
@DavidWells
DavidWells / remove-inbound-marketing-admin-bar.php
Last active Aug 29, 2015
Remove inbound now marketing admin bar for all but admin users. Add this snipper to your functions.php file
View remove-inbound-marketing-admin-bar.php
<?php
function remove_inbound_admin_bar() {
global $wp_admin_bar;
if ( is_user_logged_in() && !current_user_can( 'manage_options' )) {
$wp_admin_bar->remove_menu('inbound-admin-bar');
}
}
add_action( 'wp_before_admin_bar_render', 'remove_inbound_admin_bar' );
@DavidWells
DavidWells / genesis-wordpress-landing-page-fix.php
Last active Aug 29, 2015
Wordpress Landing pages and genesis <title> fix
View genesis-wordpress-landing-page-fix.php
<?php // Remove this <?php tag before inserting to functions
add_action( 'after_setup_theme', 'fix_bad_genesis_filter');
function fix_bad_genesis_filter() {
// fix for genesis and catalyst framework
$priority = ( function_exists( 'genesis' ) ) || ( function_exists( 'catalyst_activate' ) ) ? 6 : 50;
add_filter('wp_title','lp_ab_testing_alter_title_area', $priority, 3 );
}
@DavidWells
DavidWells / kill_form_specific_for_on_page_tracking.php
Last active Aug 29, 2015
Remove tracking from all forms on a given page for WordPress Leads
View kill_form_specific_for_on_page_tracking.php
<?php
// Add to your themes function.php file without the opening <?php tag
add_action('wp_head', 'kill_form_tracking_for_specific_pages')
if (!function_exists('kill_form_tracking_for_specific_pages')) {
function kill_form_tracking_for_specific_pages(){
// targeting page ID 106. Replace with your specific page ID
if (is_page(106)) {
echo '<script type="text/javascript">
jQuery(document).ready(function($) {
jQuery("form").each(function(){
@DavidWells
DavidWells / genesis-fix.php
Created Feb 5, 2014
Genesis fix take two
View genesis-fix.php
<?php
add_action( 'template_redirect', 'child_conditional_actions' );
function child_conditional_actions() {
if( 'landing-page' == get_post_type() ) {
remove_filter( 'wp_title', 'genesis_doctitle_wrap', 20 );
}
}
@DavidWells
DavidWells / custom-js-function-on-inbound-form-completion.js
Created Feb 7, 2014
Trigger custom javascript on inbound form completion
View custom-js-function-on-inbound-form-completion.js
jQuery(document).ready(function($) {
// Trigger custom script on inbound now form completion
$(".wpl-track-me").on("inbound_form_complete", function() {
// do stuff
});
});
@DavidWells
DavidWells / turn-off-landing-page-script-elsewhere-on-site.php
Last active Aug 29, 2015
Turn off landing page javascript on non landing page post types. Warning: This will break lead tracking for other pages
View turn-off-landing-page-script-elsewhere-on-site.php
/* Fair warning this will break page tracking */
add_action( ‘wp_print_scripts’, ‘turn_off_lp_script’, 120 );
function turn_off_lp_script(){
global $post;
if (isset($post) && $post->post_type != 'landing-page') {
wp_dequeue_script( ‘jquery-cookie’ );
wp_deregister_script( ‘jquery-total-storage’ );
}
}