Skip to content

Instantly share code, notes, and snippets.

View ccurtin's full-sized avatar
🤙
makka thangs

Christopher James Curtin ccurtin

🤙
makka thangs
View GitHub Profile
@ccurtin
ccurtin / google map 100% width of container.md
Last active October 19, 2015 04:29
google map 100% width of container

.gmap-container { border: 4px double rgba(0, 0, 0, 0.5); height: 300px; width: 100%; margin-bottom: 30px; overflow: hidden; } .googlemappa iframe { width: 100%; }

@ccurtin
ccurtin / Select Option Menu Placeholder Color.md
Last active October 7, 2016 18:00
Select Option Menu Placeholder Color
$(".select select" ).change(function() {
	$(".select select").css('color','#000');
});
<div class="select">
            <select>
 Looking For...
@ccurtin
ccurtin / Cropped and centered image featured image.scss
Created February 2, 2015 15:27
Cropped and centered image featured image
@ccurtin
ccurtin / Strip shortcode tags but keep the inner contents of it.php
Created February 2, 2015 20:37
Strip shortcode tags but keep the inner contents of it
<?php
function clean_content()
{
$the_content = get_the_content();
$the_content = preg_replace("~(?:\[/?)[^/\]]+/?\]~s", '', $the_content);
return $the_content;
}
?>
@ccurtin
ccurtin / Responsive Youtube Video, IFRAME, EMBED, or OBJECT.md
Last active October 7, 2016 17:59
Responsive Youtube Video, IFRAME, EMBED, or OBJECT

Responsive Youtube Video or IFRAME, EMBED, OBJECT, etc.


## SASS ```sass // If using more than a single column, TWO containers are requird like so; // Jeet Mixins col(); // Custom media query mixin tabet(); .video-wrapper-col { @include col(1 / 2); @include tablet {
@ccurtin
ccurtin / Testimonial Post type display with optional video.php
Last active August 27, 2016 18:22
Testimonial Post type display with optional video and microdata
<p itemscope itemtype="http://data-vocabulary.org/Review" class="testimonial">
<?php
global $wp_embed;
if (get_field('video') != '') {
?>
<div class="video-wrapper-testimonial">
<div class="testimonial-video">
<?php
$video = get_field('video');
@ccurtin
ccurtin / ACF is checkbox checked.php
Last active October 7, 2016 17:54
ACF is checkbox checked
<?php
if (get_field('allow_full_width_image')) {
$values = get_field('allow_full_width_image');
if (in_array("yes", $values)) {
$isfullwidth = ' style="width:100%;hight:auto;"';
} else {
$isfullwidth = '';
}
}
?>
@ccurtin
ccurtin / htaccess-force-www
Created March 9, 2015 22:54
.hraccess force WWW
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
@ccurtin
ccurtin / Custom Social Sharing Buttons for Wordpress Shortcode.php
Last active February 18, 2026 08:09
Custom Social Sharing Buttons for Wordpress
<?php
/*
http://stackoverflow.com/questions/12448134/social-share-links-with-custom-icons
http://petragregorova.com/articles/social-share-buttons-with-custom-icons
wp_enqueue_style('fontAwesome', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css', array(), '4.3.0', 'all');
use in template files:: <?php echo do_shortcode('[social_sharing]') ; ?>
*/
@ccurtin
ccurtin / dynamically generate taxonomy terms as sanitized CSS clases.php
Created March 19, 2015 01:22
Create dynamically generated and sanitized CSS classes as a list from a taxonomy's terms in Wordpress
<?php
/*
* Create dynamically generated and sanitized CSS classes as a list from a taxonomy's terms
* Example: <a class="<?php echo taxonmy_terms_as_css_list('Geographical Locations'); ?>"
*
*/
function taxonmy_terms_as_css_list($term_name) {
// get the taxonomy terms