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 | |
/* Register Custom Post Type */ | |
add_action( 'init', 'create_post_type' ); | |
function create_post_type() { | |
register_post_type( 'case-study', | |
array( | |
'labels' => array( | |
'name' => __( 'Case Studies' ), |
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 //* Do not include this opening php tag | |
//* Add Cart icon and count to header if WC is active | |
add_action( 'genesis_header', 'jmd_wc_cart_count' ); | |
function jmd_wc_cart_count() { | |
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { | |
$count = WC()->cart->cart_contents_count; |
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
/* Center simple social icons | |
-------------------------------------------- */ | |
body .simple-social-icons .alignleft, | |
body .simple-social-icons .alignright { | |
float: none; | |
text-align: center; | |
} |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
<!-- 0) Display Medium sized image floated right --> | |
http://sridharkatakam.com/how-to-display-featured-image-in-single-posts-in-genesis/ | |
$image_args = array( | |
'size' => 'medium', | |
'attr' => array( |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Add an ID to .site-inner | |
add_filter( 'genesis_attr_site-inner', 'custom_attributes_content' ); | |
function custom_attributes_content( $attributes ) { | |
if ( is_singular('post' ) ) { | |
$attributes['id'] = 'site-inner'; | |
} |
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 elseif ( has_post_thumbnail() ) : | |
$featured_image_link = ( get_field( 'featured_image_links_to' ) ); | |
if ( $featured_image_link ) { | |
echo '<a href="'.get_permalink($post_object->ID) .'">'; | |
if ( has_post_thumbnail()) { the_post_thumbnail( 'hero-image-medium', array( 'class' => 'large fx' ) ); } | |
echo '</a>'; | |
} else { | |
the_post_thumbnail( 'hero-image-medium', array( 'class' => 'large fx' ) ); | |
}; | |
endif; ?> |
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 // Don't include this tag. | |
add_action ( 'genesis_meta', 'jm_remove_footer' ); | |
/** | |
* Conditionally remove the entire footer. | |
* | |
* @link https://codex.wordpress.org/Conditional_Tags | |
*/ | |
function jm_remove_footer() { |
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 SearchWP Images template to your theme. | |
* | |
* Template Name: SearchWP Images | |
* | |
* @author Robert Neu | |
* @package Genesis | |
* @subpackage SearchWP | |
*/ |
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 code should be added to the functions.php file of the child theme | |
// Add custom info to Additional Information product tab | |
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 ); | |
function woo_rename_tabs( $tabs ) { | |
global $product; | |
$tabs['additional_information']['callback'] = 'custom_function_name'; // this is the function name which is included below | |
return $tabs; | |
} |
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
<!-- wp:paragraph {"align":"center","customTextColor":"#000000","backgroundColor":"very-light-gray","fontSize":"small"} --> | |
<p style="color:#000000;text-align:center" class="has-background has-small-font-size has-very-light-gray-background-color">Gutenberg Sample Content.<br/>Put together with ❤️ by <a href="https://artisanthemes.io/">Artisan Themes</a>.</p> | |
<!-- /wp:paragraph --> | |
<!-- wp:heading {"level":1} --> | |
<h1>This is a heading (H1)</h1> | |
<!-- /wp:heading --> | |
<!-- wp:heading --> | |
<h2>This is a heading (H2)</h2> |
NewerOlder