This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php function postimage($size=thumbnail, $qty=-1) { | |
if ( $images = get_children(array( | |
'post_parent' => get_the_ID(), | |
'post_type' => 'attachment', | |
'numberposts' => $qty, | |
'post_mime_type' => 'image',))) | |
{ | |
foreach( $images as $image ) { | |
$attachmenturl=wp_get_attachment_url($image->ID); | |
$attachmentimage=wp_get_attachment_image( $image->ID, $size ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Oprah Thing | |
Saw some movie and there was some Oprah-related commerical before it and it had title things like this during it | |
*/ | |
body { background: black; padding: 100px; margin: 0; } | |
h1 { | |
text-align: center; | |
color: white; | |
text-transform: uppercase; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('do_meta_boxes', 'gf_slider_image_metabox' ); | |
/** | |
* Move Featured Image Metabox on slider post type | |
*/ | |
function gf_slider_image_metabox() { | |
remove_meta_box( 'postimagediv', 'slider', 'side' ); | |
add_meta_box('postimagediv', __('Custom Image'), 'post_thumbnail_meta_box', 'slider', 'normal', 'high'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aside id="slider_wrap"> | |
<div id="slider_home"> | |
<div class="flexslider"> | |
<ul class="slides"> | |
<?php | |
$type = 'slider'; | |
$args=array( | |
'post_type' => $type, | |
'post_status' => 'publish', | |
'posts_per_page' => -1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: Home | |
*/ | |
?> | |
<?php get_header(); ?> | |
<aside id="slider_wrap"> | |
<div id="slider_home"> | |
<div class="flexslider"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/****************************************** | |
/* Testimonials Widget | |
******************************************/ | |
class office_testimonials extends WP_Widget { | |
/** constructor */ | |
function office_testimonials() { | |
parent::WP_Widget(false, $name = 'Testimonials'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); ?>, |
OlderNewer