Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Template Name: Questions Template
*
* @package kadence
*/
namespace Kadence;
Arial, Helvetica, sans-serif
"Arial Black", Gadget, sans-serif Helvetica, sans-serif
"Comic Sans MS", cursive, sans-serif
Impact, Charcoal, sans-serif
"Lucida Sans Unicode", "Lucida Grande", sans-serif
Tahoma, Geneva, sans-serif
"Trebuchet MS", Helvetica, sans-serif
Verdana, Geneva, sans-serif
Georgia, serif
"Palatino Linotype", "Book Antiqua", Palatino, serif
cd Desktop/photos/springbreak
ls
@GreggFranklin
GreggFranklin / customizer.php
Last active August 29, 2015 14:20
File to create the reveal.js settings in the customizer
<?php
/**
* Adds the individual panel, sections, settings, and controls to the theme customizer
*
* // Setup Customizer For Presentation Settings - include requirein fucntions.php
* require_once( get_template_directory() . '/inc/customizer.php' );
*/
function wppresentor_customizer_register( $wp_customize ) {
/*
@GreggFranklin
GreggFranklin / reveal_initialize_script
Last active August 29, 2015 14:20
Replacement for the existing function with the new calls to the customizer
<?php
function reveal_initialize_script() {
$settings = reveal_get_settings();
?>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
var reveal_config = {
controls: <?php echo get_theme_mod( 'controls_right_corner', '1' ); ?>,
@GreggFranklin
GreggFranklin / Add CPT to At a Glance Widget
Last active August 29, 2015 13:58
This will add a Custom Post Type count to the At A Glance widget in the Dashboard including the icon
// Add Properties to At a Glance Widget
function custom_properties_glance_items( $items = array() ) {
$post_types = array( 'estate_property'); // Add your registered custom post type
foreach( $post_types as $type ) {
if( ! post_type_exists( $type ) ) continue;
$num_posts = wp_count_posts( $type );
@GreggFranklin
GreggFranklin / gist:9688573
Created March 21, 2014 15:17
Gravity Forms
//Change upload directory for specific form, the "4" in the gform_upload_path_4 below is the form id and this is what you would change for the form you want to customize
add_filter("gform_upload_path_4", "change_upload_path");
function change_upload_path($path_info){
$path_info["path"] = "/new/path/";
$path_info["url"] = "http://new_url.com/images/";
return $path_info;
}
@GreggFranklin
GreggFranklin / gist:3801403
Created September 28, 2012 18:27
CPT & Taxonomy
register_post_type( 'products',
array(
'labels' => array(
'name' => __( 'Products','office' ),
'singular_name' => __( 'Products','office' ),
'add_new' => _x( 'Add New', 'Product','office' ),
'add_new_item' => __( 'Add Product','office' ),
'edit_item' => __( 'Edit Product','office' ),
'new_item' => __( 'New Product','office' ),
'view_item' => __( 'View Product','office' ),
@GreggFranklin
GreggFranklin / gist:3733410
Created September 16, 2012 17:39
Testimonial Widget
<?php
/******************************************
/* Testimonials Widget
******************************************/
class office_testimonials extends WP_Widget {
/** constructor */
function office_testimonials() {
parent::WP_Widget(false, $name = 'Testimonials');
}