Skip to content

Instantly share code, notes, and snippets.

View alexmustin's full-sized avatar

Alex Mustin alexmustin

View GitHub Profile
@alexmustin
alexmustin / html-widget.html
Created November 8, 2018 23:50
Course Maker Documentation - Second Chance Welcome widget example
Take a look at this example of the Course Maker theme by brandiD, built exclusively for the Genesis Framework. We like it so much, we're going to use it to market our own Personal Branding class.
<a class="button" href="https://www.youtube.com/watch?v=YbRubFUmAtc" rel="wp-video-lightbox">Watch Video</a>
@alexmustin
alexmustin / html-widget.html
Last active November 8, 2018 23:42
Course Maker Documentation - Home - Welcome widget example
<h1>Get to the Head of the Class</h1>
<p class="subhead">Lead your class with this clear, vibrant, easy-to-edit Genesis theme.</p>
<p>This theme is packed full of features and functionality to help you market your new course. The homepage layout will drive traffic to your site and engage users with your online course materials while communicating than you're an autority in your space, without actually saying that -- unless you want it to!</p>
<a href="https://thebrandidthemes.com/shop/" class="button">Buy the Theme</a>
@alexmustin
alexmustin / widget.html
Created November 8, 2018 23:39
Course Maker Documentation - "button" class example
<a href="#" class="button">Buy the Theme</a>
@alexmustin
alexmustin / widget.html
Created November 8, 2018 23:30
Course Maker Documentation - "subhead" class example
<p class="subhead">Lead your class with this clear, vibrant, easy-to-edit Genesis theme.</p>
@alexmustin
alexmustin / functions.php
Created October 3, 2018 19:32
WordPress Customizer - Remove existing Controls, Panels, and Sections
<?php
add_action( "customize_register", "am_customizer_mods" );
function am_customizer_mods( $wp_customize ) {
//* Remove 'header image' Control
$wp_customize->remove_control("header_image");
//* Remove 'widgets' Panel
$wp_customize->remove_panel("widgets");
@alexmustin
alexmustin / functions.php
Last active October 9, 2023 11:04
Genesis - Custom SVG Logo in WordPress Customizer
<?php
//* Add support for a Custom Logo
add_theme_support( 'custom-logo', array(
'width' => 260,
'height' => 100,
'flex-width' => true,
'flex-height' => true,
) );
@alexmustin
alexmustin / theme-setup.php
Last active April 9, 2019 16:41
Genesis: Add the Featured Image to Single Post pages
<?php
// Add featured image on single post
add_action( 'genesis_entry_header', 'hellopro_featured_image', 1 );
function hellopro_featured_image() {
$image = genesis_get_image( array(
'format' => 'html',
'size' => 'featured',
'context' => '',
'attr' => array ( 'class' => 'aligncenter' ),
@alexmustin
alexmustin / functions.php
Last active July 23, 2018 19:11
WooCommerce - Add custom field to Checkout page
<?php
/* ADD 'WEBSITE' REQUIRED FIELD TO CHECKOUT PAGE
----------------------------------------------------------------------------- */
//* Check if a specific product ID is in the cart
function hm_product_is_in_cart( $ids ) {
// Products currently in the cart
$cart_ids = array();
// Find each product in the cart and add it to the $cart_ids array
foreach( WC()->cart->get_cart() as $cart_item_key => $values ) {
@alexmustin
alexmustin / functions.php
Last active May 4, 2018 17:14
WooCommerce - allow editing of Orders regardless of Status
<?php
// WooCommerce -- allow editing of Orders regardless of Status
add_filter ( 'wc_order_is_editable', 'force_order_statuses_to_editable' );
function force_order_statuses_to_editable () {
return TRUE;
}
?>
@alexmustin
alexmustin / theme-setup.php
Last active April 18, 2018 18:52
CoachingPro theme setup modification -- disable first image as Featured Image
<?php
// Copy/Paste this code to overwrite the current code, starting at Line 220 of /coaching-pro/lib/theme-setup.php
add_action( 'genesis_entry_header', 'coaching_pro_show_featured_post_image', 1 );
function coaching_pro_show_featured_post_image() {
// only show on single posts and pages
if ( ! is_single() && ! is_page() || ! has_post_thumbnail() ) {
return;
}