This file contains hidden or 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 | |
// This breaks Genesis, due to body class hooks (needs if statement) | |
function idxbroker_wrappers_wpbody_class_names( $classes) { | |
if ( 'idx-wrapper' == get_post_type() ) { | |
return array('idxbroker idxbroker-dynamic-wrapper dynamic-wrapper-'.get_the_title().'' ); | |
} else { } | |
} | |
add_filter('body_class','idxbroker_wrappers_wpbody_class_names'); |
This file contains hidden or 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
<ul> | |
<li><a href="#a">A</a></li> | |
<li><a href="#b">B</a></li> | |
<li><a href="#c">C</a></li> | |
</ul> | |
<hr /> | |
<h3 id="a">A</h3> |
This file contains hidden or 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 themename_customize_register($wp_customize){ | |
$wp_customize->add_section('themename_color_scheme', array( | |
'title' => __('Color Scheme', 'themename'), | |
'priority' => 120, | |
)); | |
// ============================= |
This file contains hidden or 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 | |
if ( defined('IS_WPE_SNAPSHOT') && IS_WPE_SNAPSHOT ) { | |
deactivate_plugins( plugin_basename( __FILE__ ) ); | |
} |
This file contains hidden or 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 | |
/* Hook to 'add_meta_boxes' with lower priority. */ | |
add_action( 'add_meta_boxes', 'idxbroker_remove_wpseo_metabox', 11 ); | |
/** | |
* Remove WordPress seo meta box. | |
*/ | |
function idxbroker_remove_wpseo_metabox() { | |
if ( get_post_type() == 'idx-wrapper' ) { | |
remove_meta_box( 'wpseo_meta', 'idx-wrapper', 'normal' ); | |
remove_meta_box( 'sharing_meta', 'idx-wrapper', 'advanced'); |
This file contains hidden or 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
function dj_modify_num_posts_for_testimonials($query) | |
{ | |
if ($query->is_main_query() && $query->is_post_type_archive('testimonials') && !is_admin()) | |
$query->set('posts_per_page', 20); | |
} | |
add_action('pre_get_posts', 'dj_modify_num_posts_for_testimonials'); |
This file contains hidden or 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 | |
// Always add idx tags to wrappers | |
add_filter ('the_content', 'idxbroker_add_idx_tags', 99); | |
function idxbroker_add_idx_tags($content) { | |
global $post; | |
$idxstart = '<div id="idxStart" style="display: none;"></div>'; | |
$idxstop = '<div id="idxStop" style="display: none;"></div>'; |