Skip to content

Instantly share code, notes, and snippets.

Avatar

iamandrewpeters

View GitHub Profile
View bb-clickble-col.js
/**
* 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();
});
View social-share-styling.css
/* Colors for the icons */
.fa-facebook-square {
color: #378997;
}
.fa-twitter {
color: #EF6832;
}
.fa-envelope-open {
View fm-settings-setup.php
<?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',
View faithmade-settings-tweaks.php
//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 Aug 20, 2019
CSS to tweak the Tutor LMS styling on the backend
View tutorlms-admin-style.css
/* 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{
View gist:1fd5eba2321c1777151712a9ec014d93
//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 Aug 9, 2019
CCB Press + Gravity Forms Paremeters
View CCBPress-gf-param.php
<?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 Aug 2, 2019
Resource Library CPT and Tax
View resourceposttype.php
//Create Resource Post Type
function register_my_resources_cpt() {
$labels = array(
"name" => __( "Resources", "" ),
"singular_name" => __( "Resource", "" ),
);
$args = array(
View gist:d45e4a47c8f9740f7c6537e5fadffb9f
// 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 Jun 17, 2019
Register Taxonomies and add to Filter Bar
View gist:51f907195a95242e7adf525f3d2a1001
// 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' ),