Skip to content

Instantly share code, notes, and snippets.

View themeblvd's full-sized avatar

Jason Bobich themeblvd

View GitHub Profile
@themeblvd
themeblvd / jumpstart_typography_options.php
Created October 21, 2012 17:41
Add typography options to Jump Start
<?php
/**
* Add Styles Option tab
*/
themeblvd_add_option_tab( 'styles', 'Styles', true );
/**
* Add typography section of two options,
* one for the body and for the headers.
*/
@themeblvd
themeblvd / woo-commerce-patch-full-width-sidebar.php
Created October 26, 2012 18:16
If you're using the Theme Blvd Woo Commerce patch plugin, this is how you'd make the default sidebar layout full width.
/**
* Force WooCommerce full_width layout.
*/
function my_woocommerce_sidebar_layout( $sidebar_layout ){
global $post;
// Only run if WooCommerce plugin is installed
if( function_exists( 'is_woocommerce' ) ) {
// The PHP
/**
* Add primary item to cart (Ajax).
*/
function themeblvd_ajax_add_to_cart() {
if( isset($_POST['download_id']) && check_ajax_referer( 'edd_ajax_nonce', 'nonce' ) ) {
global $post;
if( ! edd_item_in_cart($_POST['download_id'] ) ) {
@themeblvd
themeblvd / options.js
Last active December 16, 2015 04:09
A fix for using WP-Views plugins with Theme Blvd theme. Create a file options.js and register with ID "themeblvd_options" before the framework does in your Child theme.
/**
* Prints out the inline javascript needed for the colorpicker and choosing
* the tabs in the panel.
*/
jQuery(document).ready(function($) {
// Fade out the save message
$('.fade').delay(1000).fadeOut(1000);
Here's what I'm doing. Let me know if this isn't happening for you.
1) Add more than one upload option to the options page.
2) Upload and insert an image on any of the upload options.
3) Go to another one of the upload options. -- Now here, when I select the image and
insert it, it inserts properly, but modal window does not close. I have to "X" out of it.
-- This seems to be something with how you're binding remove/upload actions upon changing
@themeblvd
themeblvd / alyeska.min.js
Created April 18, 2013 20:30
Replacement for alyeska.min.js in Alyeska v2.1 to fix search popup not coming up in IE8.
jQuery(document).ready(function(a){a("#main-menu .menu").superfish({autoArrows:false});a("ul.menu .no-click").find("a:first").click(function(){return false});a(".gallery").append('<div class="clear"></div>');a(".gallery").each(function(){var c=a(this),b=c.attr("id");c.find(".gallery-item a").each(function(){if(this.href.match(/\.(jpe?g|png|bmp|gif|tiff?)$/i)){a(this).attr("rel","themeblvd_lightbox["+b+"]");a(this).addClass("image-button")}})});a('a[rel^="themeblvd_lightbox"], a[rel^="featured_themeblvd_lightbox"]').prettyPhoto({social_tools:false,deeplinking:false,overlay_gallery:false,show_title:false});a('a[rel^="themeblvd_lightbox"]').prepend('<span class="enlarge"></span>');a('a[rel^="themeblvd_lightbox"]').hover(function(){var b=a(this);b.find(".enlarge").stop(true,true).animate({opacity:1},100);b.find("img").stop(true,true).animate({opacity:0.6},100)},function(){var b=a(this);b.find(".enlarge").stop(true,true).animate({opacity:0},100);b.find("img").stop(true,true).animate({opacity:1},100)});a(".featured
// In your child theme's functions.php just unhook the process.
// Your client obviously doesn't need to know about TB plugins
// at this point; so it's no biggy... No "hacking" involved :)
remove_action( 'after_setup_theme', 'themeblvd_plugins' );
<?php
/*
Plugin Name: Theme Blvd Shortcodes
Description: This plugin works in conjuction with the Theme Blvd framework to create shortcodes for many of the framework's internal elements.
Version: 1.4.1
Author: Theme Blvd
Author URI: http://themeblvd.com
License: GPL2
Copyright 2013 Theme Blvd
<?php
/*
Plugin Name: Theme Blvd Shortcodes
Description: This plugin works in conjuction with the Theme Blvd framework to create shortcodes for many of the framework's internal elements.
Version: 1.4.1
Author: Theme Blvd
Author URI: http://themeblvd.com
License: GPL2
Copyright 2013 Theme Blvd
<?php
function my_post_grid() {
global $wp_query;
global $post;
// Open first row
echo '<div class="row">';
$i = 1;