Skip to content

Instantly share code, notes, and snippets.

View contempoinc's full-sized avatar

Chris Robinson contempoinc

View GitHub Profile
@contempoinc
contempoinc / functions.php
Created August 11, 2015 17:03
my_custom_header_text()
// This is your function, you can name it anything you want
function my_custom_header_text() { ?>
<div class="my-custom-class clear">Some Text, could be anything though</div>
<?php }
// This is the action function that outputs the function above into the theme hook
add_action( 'ct_before_header', 'my_custom_header_text', 999 );
// This is your function, you can name it anything you want
function my_custom_search_header_text() { ?>
echo '<div class="my-custom-class container">Some Text, could be anything though</div>';
<?php }
// This is the action function that outputs the function above into the theme hook
add_action( 'before_listings_search_header', 'my_custom_search_header_text', 999 );
<?php
/**
* Template Name: Agents
*
* @package WP Pro Real Estate 5
* @subpackage Template
*/
global $ct_options;
add_action( 'wp_print_scripts', 'de_script', 100 );
function de_script() {
wp_dequeue_script( 'cycle' );
}
<?php
// Deregister Cycle
add_action( 'wp_print_scripts', 'de_script', 100 );
function de_script() {
wp_dequeue_script( 'cycle' );
}
?>
<?php
if($ct_options['ct_post_comments'] == "Yes" && comments_open()) {
comments_template( '', true );
}
?>
<?php
wp_deregister_script('gmaps');
if(!is_page_template('template-submit-listing.php')){
wp_enqueue_script('gmapsapi', 'http://maps.google.com/maps/api/js?sensor=false&key=AIzaSyBg0BEB7TF-Lp8UTsn7X4CIY0muA4rTE2k', '', '1.0', false);
}
?>
/*
Theme Name: WP Pro Real Estate 7
Theme URI: http://themeforest.net/user/contempoinc?ref=contempoinc
Description: A responsive real estate theme, designed by <a href="http://www.contempographicdesign.com">Contempo</a>.
Author: Chris Robinson
Author URI: http://www.contempographicdesign.com
Version: 1.0.9
Text Domain: contempo
Domain Path: /languages
/*
* Base
*
* @package WP Pro Real Estate 7
* @subpackage CSS
*
WARNING! DO NOT EDIT THIS FILE!
To make it easy to update your theme, you should not edit the styles in this file. Instead use
@contempoinc
contempoinc / functions.php
Created September 17, 2015 18:38
PDF+XML functions
<?php
/* Usage Instructions
* [get-pdf-link] will return a raw link to the first PDF attachment to the post/page
*
* [pdf-content type="title|content"] "title" will return the Title of the PDF, which is referenced as "Root" in the XML document.
* ...continued: "content" will return the <Story> of the XML file, which is the top paragraph as assigned during PDF creation.
*/
add_filter('upload_mimes', 'custom_upload_xml');