Skip to content

Instantly share code, notes, and snippets.

View iamandrewpeters's full-sized avatar

Andrew Peters iamandrewpeters

View GitHub Profile
@iamandrewpeters
iamandrewpeters / bb-clickble-col.js
Created June 9, 2020 16:42 — forked from carlosonweb/bb-clickble-col.js
Make a BB Column Clickable
/**
* Makes a BB Column clickable.
* Pre-requisite: There must be an A Tag contained within the column element.
*/
jQuery(document).ready(function($){
$('.clickable-col').css('cursor', 'pointer');
$('.clickable-col').on('click', function(event){
$(this).find('a')[0].click();
});
@iamandrewpeters
iamandrewpeters / social-share-styling.css
Created January 30, 2020 14:51
Social Sharing with Twig
/* Colors for the icons */
.fa-facebook-square {
color: #378997;
}
.fa-twitter {
color: #EF6832;
}
.fa-envelope-open {
@iamandrewpeters
iamandrewpeters / fm-settings-setup.php
Created October 16, 2019 19:45
FM Settings Setup
<?php
//Add Settings Pages to Customizer
//Styles Page
add_filter( 'mb_settings_pages', function ( $settings_pages ) {
$settings_pages[] = array(
'id' => 'fm_styles_panel',
'option_name' => 'theme_mods_page-builder-framework',
'menu_title' => 'Style Settings',
'parent' => 'themes.php',
'customizer' => 'true',
@iamandrewpeters
iamandrewpeters / faithmade-settings-tweaks.php
Created October 14, 2019 13:29
MB Settings + Customizer
//Register Settings pages for styles and info
add_filter( 'mb_settings_pages', function ( $settings_pages ) {
$settings_pages[] = array(
'id' => 'fm_styles_panel',
'option_name' => 'theme_mods_page-builder-framework',
'menu_title' => 'Style Settings',
'parent' => 'themes.php',
'customizer' => 'true',
);
@iamandrewpeters
iamandrewpeters / tutorlms-admin-style.css
Created August 20, 2019 22:10
CSS to tweak the Tutor LMS styling on the backend
/* Tutor Backend Colors */
#tutor-course-topics h2:before, #tutor-instructors h2:before {
color: #5ACDC1;
}
a.tutor-button.bordered-button,
.tutor-button.bordered-button,
a.tutor-btn.bordered-btn,
.tutor-btn.bordered-btn{
//Add Category Selector
add_filter( 'rwmb_meta_boxes', 'cat_select_register_meta_boxes' );
function cat_select_register_meta_boxes( $meta_boxes ) {
$meta_boxes[] = array (
'title' => 'Some Extra Info',
'id' => 'post-purpose-select-title',
'post_types' => array(
0 => 'post',
),
'context' => 'normal',
@iamandrewpeters
iamandrewpeters / CCBPress-gf-param.php
Created August 9, 2019 14:59
CCB Press + Gravity Forms Paremeters
<?php if ( $mailto = $template::get_mailto( $group_profile ) ) : ?>
<div class="ccbpress-group-leader-contact">
<a href="https://rockbridge.cc/full-page-forms/join-a-group/?rb_group_name=<?php echo urlencode( $item->name );?>&group_leader_email=<?php echo urlencode ( $group_profile->main_leader_email );?>&rb_campus_name=<?php echo urlencode ( $group_profile->campus ); ?>" target="_blank">Group Signup</a>
</div>
<?php endif; ?>
// Make sure the ?param-name matches your dynamic population parameter name in the corresponding Gravity Form
@iamandrewpeters
iamandrewpeters / resourceposttype.php
Last active December 9, 2021 14:48
Resource Library CPT and Tax
//Create Resource Post Type
function register_my_resources_cpt() {
$labels = array(
"name" => __( "Resources", "" ),
"singular_name" => __( "Resource", "" ),
);
$args = array(
@iamandrewpeters
iamandrewpeters / gist:d45e4a47c8f9740f7c6537e5fadffb9f
Created July 31, 2019 16:09
Add Filter to Media with a Taxonomy
// register new taxonomy which applies to attachments
function reach_add_media_taxonomy() {
$labels = array(
'name' => 'Media Type',
'singular_name' => 'Media Type',
'search_items' => 'Search Media Types',
'all_items' => 'All Media Types',
'parent_item' => 'Parent Media Type',
'parent_item_colon' => 'Parent Media Type:',
@iamandrewpeters
iamandrewpeters / gist:51f907195a95242e7adf525f3d2a1001
Created June 17, 2019 21:29
Register Taxonomies and add to Filter Bar
// Add Campuses Taxonomy
function register_my_taxes_campus() {
$labels = array(
"name" => __( "Campus" ),
"singular_name" => __( "Campus" ),
'new_item_name' => __( 'Add New Campus', 'text_domain' ),
'add_new_item' => __( 'Add New Campus', 'text_domain' ),