Skip to content

Instantly share code, notes, and snippets.

View BoweFrankema's full-sized avatar

Bowe Frankema BoweFrankema

View GitHub Profile
@BoweFrankema
BoweFrankema / disable-icons-cbox
Created August 8, 2013 17:25
Disabling the CBOX Icons through infinity.ini. Full tutorial: http://commonsinabox.org/archives/3271
[feature]
infinity-icon-font = off
infinity-icons = off
<h2 id="this-is-my-section-link">This is my section title</h2>
<a href="#this-is-my-section-link">This goes straight to the section</a>
@BoweFrankema
BoweFrankema / gist:10596814
Created April 13, 2014 18:47
WordPress Language Check
<?php
$currentlang = get_bloginfo('language');
?>
<nav class="collapse navbar-collapse" role="navigation">
<?php if($currentlang=="en-US"):?>
<?php
if (has_nav_menu('primary_navigation')) :
@BoweFrankema
BoweFrankema / example.php
Last active August 29, 2015 13:59
Titan Framework and LESS Variables
<?php
/**
* Pass variables from Titan Option to WP-LESS. This seems tricky.
*/
function cf_theme_variables()
{
if (class_exists('WPLessPlugin')){
$titan = TitanFramework::getInstance( 'cfcommunity-roots' );
$less = WPLessPlugin::getInstance();
$primary_brand = $titan->getOption( 'my_text_option' );
@BoweFrankema
BoweFrankema / buddypress-groups-loop.php
Created August 4, 2014 13:05
BuddyPress Groups Loop with specific groups based on ID
<?php
$args = array(
'include' => "4,5,2",
'max' => 5
);
if ( bp_has_groups( $args) ) :
?>
<ul id="groups-list" class="item-list">
<?php while ( bp_groups() ) : bp_the_group(); ?>
@BoweFrankema
BoweFrankema / base.php
Created August 14, 2014 13:40
BuddyPress Media and Roots Theme Lightbox solution
<?php get_template_part('templates/head'); ?>
<?php if ( function_exists( 'rtmedia_autoloader' ) && ! $rt_ajax_request ): ?>
<body <?php body_class(); ?>>
<!--[if lt IE 8]><div class="alert alert-warning"><?php _e('You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.', 'roots'); ?></div><![endif]-->
<?php
do_action('get_header');
// Use Bootstrap's navbar if enabled in config.php
@BoweFrankema
BoweFrankema / block-activity-types.php
Last active August 29, 2015 14:05
BuddyPress Block Activity Types Plugin replacement
<?php
//Block certain activity types from being added
function bp_activity_dont_save( $activity_object ) {
$exclude = array(
'updated_profile',
'new_member',
'new_avatar',
'friendship_created',
'joined_group'
);
@BoweFrankema
BoweFrankema / cover-photo.php
Last active March 27, 2023 23:12
Add Cover Photo functionality to BuddyPress
<?php
function setup_cover_profile_nav(){
global $bp;
$profile_link = bp_loggedin_user_domain() . $bp->profile->slug . '/';
$args = array(
'name' => 'Profile Cover',
'slug' => 'change-cover',
'parent_url' => $profile_link,
'parent_slug' => $bp->profile->slug,
'screen_function' => 'screen_change_cover',
@BoweFrankema
BoweFrankema / buddypress-activity-load.js
Created September 4, 2014 20:27
Fire a jQuery function on BuddyPress Activity Stream "Load More".
jQuery('ul#activity-stream').on('DOMNodeInserted', function() {
// Your jQuery Magic here
});