Skip to content

Instantly share code, notes, and snippets.

View robertox85's full-sized avatar

Roberto Di Marco robertox85

View GitHub Profile
@dustinboston
dustinboston / common-media-queries.css
Created October 10, 2012 18:29
Common Media Queries
/* This is a small sampling of the various approaches to media queries. The
point is: they're all over the board. Part of the "issue" (if you can call
it that) may be due to the intended audience of each site/framework. Another
may be that it's really difficult to test for a lot of different devices.
Regardless, it would be really nice if there was standard baseline that
could be used as a starting point for maximum compatibility and coverage. */
/* ==========================================================================
Frameworks
========================================================================== */
@strangerstudios
strangerstudios / gist:3111478
Last active April 23, 2024 12:52
Lockdown BuddyPress with Paid Memberships Pro Example
<?php
/*
Plugin Name: PMPro BuddyPress Customizations
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-buddypress-customizations/
Description: Example code to lock down parts of BuddyPress with PMPro
Version: 0.2
Author: Stranger Studios
Author URI: http://www.strangerstudios.com
*/
/*
@tiltos
tiltos / gist:2042540
Created March 15, 2012 06:36
WP: Get custom taxonomy parent
<?php
$term = get_the_terms( $post->ID, 'custom-taxonomy' );
foreach ($term as $key) {
$parents = get_ancestors( $key->term_id, 'custom-taxonomy' );
foreach ($parents as $parent) {
$key = get_term($parent, 'custom-taxonomy');
$parent = $key->slug;
}
}
echo $parent;