Skip to content

Instantly share code, notes, and snippets.

@Dirtyern12
Dirtyern12 / project.php
Created January 12, 2015 18:04
project.php
<?php
/**
* Archive Page Template for project CPT
*
* @package D2C_JetFab
* @author Travis Smith <[email protected]>
* @copyright Copyright (c) 2014, Travis Smith
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 1.0.0
*/
@Dirtyern12
Dirtyern12 / custom-menu.js
Created October 15, 2014 03:22
Sidebar drop down
//fire on selected Menu
jQuery(document).ready(function() {
jQuery('#menu-shop-menu').navgoco({//swap in your Menu CSS ID
caretHtml: '<i class="vert-menu"></i>',
accordion: true
});
});
<?php
/**
* Child Theme Settings
* Requires Genesis 1.8 or later
*
* This file registers all of this child theme's specific Theme Settings, accessible from
* Genesis > Child Theme Settings.
*
* @package BE Genesis Child
* @author Bill Erickson <[email protected]>
function metaboxes() {
add_meta_box('contact-information', 'Splash Page', array( $this, 'contact_information' ), $this->pagehook, 'main', 'high');
}
/**
* Callback for Contact Information metabox
*
* @since 1.0.0
function wps_do_pitbull_image_one() {
wps_id_open( 'pitbull_image_one' );
global $post;
wps_id_open( 'pitbull_image_one' );
echo wp_get_attachment_image($pitbull_image_one_id, 'smallersquare', false, array( 'class' => 'blah', 'alt' => trim (strip_tags( get_post_meta($attachment_id, '_wp_attachment_image_alt', true) ), ) );
wps_div_close();
wps_div_close();
}
function wps_do_produced_image() {
wps_id_open( 'produced_image' );
global $post;
wps_id_open( 'produced_image' );
echo '<p><img src="' .get_post_meta( $post->ID, '_d2c_produced_image', true ).'" /></p>';
wps_div_close();
wps_div_close();
}
<?php
// Remove the post info function
remove_action('genesis_before_post_content', 'genesis_post_info');
remove_action('genesis_after_post_content', 'genesis_post_meta');
// Remove post comments
remove_action('genesis_after_post_content', 'genesis_post_comments');
//add meta boxes
add_action( 'genesis_post_content' , 'wps_do_pitbull_sire' );
<?php
add_action( 'genesis_post_content' , 'wps_do_price' );
function wps_do_price() {
wps_class_open( 'price' );
echo '<p>', '&#36;'.__(get_post_meta( $post->ID, '_d2c_price', true ), 'd2c').'</p>';
wps_div_close();
}