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 | |
/** | |
* This file adds the city team template to any Genesis 2.0+ Theme. | |
* | |
* @author Jim Thornton | |
* @package InboundFound | |
* @subpackage Customizations | |
*/ | |
/* | |
Template Name: Team |
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( 'init', 'team_post_type', 0 ); | |
function team_post_type() { | |
// Create labels for your custom fields | |
$labels = array( | |
'name' => _x("Team", "post type general name"), | |
'singular_name' => _x("Team", "post type singular name"), |
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
.profile { | |
position: relative; | |
margin: 0 0 20px; | |
float:left; | |
width: 40%; | |
margin-right: 5%; | |
margin-left: 5%; | |
} |
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
// Create Woocommerce Custom Field (here called Base Name) | |
add_action( 'woocommerce_product_options_general_product_data', 'woo_add_custom_general_fields' ); | |
function woo_add_custom_general_fields() { | |
global $woocommerce, $post; | |
echo '<div class="options_group custom_wc_field">'; | |
woocommerce_wp_text_input( // Make our text field with the following | |
array( | |
'id' => 'base_name', |
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 Google Tag Manager after opening body tag for genesis on wordpress (part 2) | |
add_action( 'genesis_before', 'add_custom_google_tag_manager_2', 1 ); | |
function add_custom_google_tag_manager_2() { | |
//* replace XXXXXXX with your GTM tracking ID | |
?> | |
<!-- Google Tag Manager (noscript) --> | |
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX" | |
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | |
<!-- End Google Tag Manager (noscript) --> | |
<?php |
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 Google Tag Manager after opening body tag for genesis on wordpress (part 1) | |
add_action( 'wp_head', 'add_custom_google_tag_manager_1', 1 ); | |
function add_custom_google_tag_manager_1() { | |
//* replace XXXXXXX with your GTM tracking ID | |
?> | |
<!-- Google Tag Manager --> | |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= |
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 | |
// conditionally remove the intercom snippet from wp_footer for posts but not pages | |
add_action('wp_enqueue_scripts','remove_intercom_blog_posts'); | |
function remove_intercom_blog_posts () { | |
if ( is_single() ) { | |
remove_action( 'wp_footer', 'add_intercom_snippet' ); | |
} |
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 | |
// if divi builder is active on a page or post then force full width genesis layout on page | |
add_filter( 'genesis_site_layout', 'if_divi_active_do_full_width_page' ); | |
function if_divi_active_do_full_width_page() { | |
if( | |
// divi builder is being used on that page | |
) { | |
return 'full-width-content'; |
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 | |
// remove styles for gravity form id 1 | |
// @ https://docs.gravityforms.com/gform_enqueue_scripts/#2-dequeue-stylesheets | |
add_action( 'gform_enqueue_scripts_1', 'dequeue_gravity_form_styles_for_form_1', 11 ); | |
function dequeue_gravity_form_styles_for_form_1() { | |
wp_dequeue_style( 'gforms_datepicker_css' ); | |
wp_dequeue_style( 'gforms_formsmain_css' ); | |
wp_dequeue_style( 'gforms_ready_class_css' ); | |
OlderNewer