Skip to content

Instantly share code, notes, and snippets.

public function add_meta_box( $post_type ) {
$post_type = 'notes'; //limit meta box to certain post types
add_meta_box(
'handshaken_note_settings',
__( 'Note Settings', 'handshaken' ),
array( $this, 'render_meta_box_content_note' ),
$post_type,
'advanced',
'high'
);
<?
/**
* @author Joachim Kudish
* @uses SLD Custom Content Types & Taxonomies
* types & taxonomies
*/
if (function_exists('sld_register_post_type')) :
function swell_theme_customizer( $wp_customize ) {
//-------------------------------------------------------------------------------------------------------------------//
// Page Templates
//-------------------------------------------------------------------------------------------------------------------//
$wp_customize->add_section( 'swell_templates_section' , array(
'title' => __( 'Page Templates', 'swelltheme' ),
'priority' => 103,
) );
@lizkaraffa
lizkaraffa / orginal-home.php
Created January 12, 2016 18:12
Original template file before my changes.
<?php $pageOne = get_theme_mod( 'page_one', '2' ); $pageTwo = get_theme_mod( 'page_two', '2' ); $pageThree = get_theme_mod( 'page_three', '2' ); ?>
<?php if ( 'false' == ( $pageOne ) || '' != ( $pageOne ) && 'false' == ( $pageTwo ) || '' != ( $pageTwo ) && 'false' == ( $pageThree ) || '' != ( $pageThree ) ) { ?>
<!-- BEGIN .row -->
<div class="row featured-pages">
<!-- BEGIN .content -->
<div class="content">
<!-- BEGIN .sixteen columns -->
@lizkaraffa
lizkaraffa / gist:5cece180358709df1c2b
Created January 12, 2016 18:13
Changed home template to include programs
<?php $pageOne = get_theme_mod( 'page_one', '2' ); $pageTwo = get_theme_mod( 'page_two', '2' ); $pageThree = get_theme_mod( 'page_three', '2' ); ?>
<?php if ( 'false' == ( $pageOne ) || '' != ( $pageOne ) && 'false' == ( $pageTwo ) || '' != ( $pageTwo ) && 'false' == ( $pageThree ) || '' != ( $pageThree ) ) { ?>
<!-- BEGIN .row -->
<div class="row featured-pages">
<!-- BEGIN .content -->
<div class="content">
<!-- BEGIN .sixteen columns -->
<?php
/**
* Plugin Name: GreekBank Functionality
* Plugin URI: http://zao.is
* Description: Adds all necessary functionality for GreekBank
* Version: 1.0
* Author: Justin Sainton
* Author URI: http://zao.is
*/
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Grid of products.
*
* @author WooThemes
* @category Widgets
* @package WooCommerce/Widgets
<?php
/**
* The template for displaying product widget entries
*
* This template can be overridden by copying it to yourtheme/woocommerce/content-widget-product.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Grid of products.
*
* @author WooThemes
* @category Widgets
@lizkaraffa
lizkaraffa / css.php
Created May 26, 2016 18:20
Before merge conflict fixed
<?php
add_action( 'wp_enqueue_scripts' , '_wpsc_te2_enqueue_styles', 1 );
function _wpsc_te2_enqueue_styles() {
wp_register_style( 'wpsc-common', wpsc_locate_asset_uri( 'css/common.css' ), array(), WPSC_VERSION );
do_action( 'wpsc_register_styles' );
wp_enqueue_style( 'wpsc-common' );