Skip to content

Instantly share code, notes, and snippets.

@omurphy27
omurphy27 / Google My Maps Embed Change Zoom Level .html
Created February 18, 2015 19:03
Google My Maps Embed - Change Zoom Level
// Google Maps change zoom level
// just append &z=15 at the end of src url
<iframe src="https://www.google.com/maps/d/embed?mid=zFZSXubrjIbQ.kTtvWjBE06QI&amp;z=15" width="640" height="480"></iframe>
@omurphy27
omurphy27 / WP WooCommerce Override Container Hooks for Single Product.php
Created January 28, 2015 21:40
WP WooCommerce Override Container Hooks for Single Product.php
<?php
add_action('woocommerce_before_main_content', 'arom_before_main_content');
function arom_before_main_content() {
echo '<div class="main-bg no-top-banner">
<div class="container">
<div id="content" class="row" >
<div id="main" class="interior col-sm-12" >';
}
@omurphy27
omurphy27 / Fixing Chrome issue with buggy position fixed CSS backgrounds (especially tileable repeated pattern backgrounds).html
Created January 16, 2015 20:56
Fixing Chrome issue with buggy position fixed CSS backgrounds (especially tileable repeated pattern backgrounds)
// Fixing Chrome issue with buggy position fixed CSS backgrounds (especially tileable repeated pattern backgrounds)
// credit http://stackoverflow.com/questions/23571578/chrome-issue-with-background-attachment-fixed-and-position-fixed-elements
// the markup
<div class="section text-center fixed-bg" id="pricing">
<div class="section-clipper">
<div class="section-image">
</div>
</div>
@omurphy27
omurphy27 / Jquery Smooth Scrolling for Bootstrap Scroll Spy Nav.js
Created January 15, 2015 22:30
Jquery Smooth Scrolling for Bootstrap Scroll Spy Nav.js
// simple smooth scrolling for bootstrap scroll spy nav
// credit http://stackoverflow.com/questions/14804941/how-to-add-smooth-scrolling-to-bootstraps-scroll-spy-function
$(".navbar-nav li a[href^='#']").on('click', function(e) {
// prevent default anchor click behavior
e.preventDefault();
// store hash
var hash = this.hash;
@omurphy27
omurphy27 / jQuery - add active class to bootstrap accordion panel heading.js
Last active November 16, 2015 21:01
jQuery - add active class to bootstrap accordion panel heading.js
// jQuery - add active class to Bootstrap Accordion Heading
if ($('#accordion').length) {
var $panels = $('.panel');
// add active class to first open panel
// only necessary if this panel is open by default on your accordion
$panels.first().addClass('active');
@omurphy27
omurphy27 / Gravity Forms WP CSS Honeypot styling.css
Last active June 20, 2022 02:10
Gravity Forms WP CSS Honeypot styling.css
.gform_validation_container,
.gform_wrapper .gform_validation_container,
body .gform_wrapper li.gform_validation_container,
body .gform_wrapper .gform_body ul.gform_fields li.gfield.gform_validation_container,
body .gform_wrapper ul.gform_fields li.gfield.gform_validation_container {
display: none !important;
position: absolute !important;
left: -9000px;
}
@omurphy27
omurphy27 / Bootstrap Tabs used with Advanced Custom Fields ACF PHP JS HTML.php
Last active February 4, 2025 21:32
Bootstrap Tabs used with Advanced Custom Fields ACF PHP JS HTML
<?php if( have_rows('tabs') ): ?>
<ul class="nav nav-tabs" id="myTab" role="tablist">
<?php $i=0; while ( have_rows('tabs') ) : the_row(); ?>
<?php
$string = sanitize_title( get_sub_field('tab_title') );
?>
<li role="presentation" <?php if ($i==0) { ?>class="active"<?php } ?> >
<a href="#<?php echo $string ?>" aria-controls="<?php echo $string ?>" role="tab" data-toggle="tab"><?php the_sub_field('tab_title'); ?></a>
</li>
<?php $i++; endwhile; ?>
@omurphy27
omurphy27 / HTML Default Viewport Meta Tag for Responsive.html
Last active August 29, 2015 14:12
HTML Default Viewport Meta Tag for Responsive.html
<meta name=viewport content="width=device-width, initial-scale=1">
<!-- Recommended viewport tag as per Google: https://developers.google.com/speed/docs/insights/ConfigureViewport?hl=en -->
@omurphy27
omurphy27 / CSS keyframes fade in transitions and animation syntax.css
Created December 19, 2014 02:28
CSS keyframes fade in transitions and animation syntax.css
.fadeinDown {
-webkit-animation: fadeInDown 500ms ease-in-out; /* Chrome, Safari, Opera */
animation: fadeInDown 500ms ease-in-out;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes fadeInDown {
0% {
@omurphy27
omurphy27 / Horizontal line on each side of heading with no background color or extra markup CSS HTML
Created December 11, 2014 02:29
Horizontal line on each side of heading with no background color or extra markup CSS HTML
// lines on other side of a heading
// without using extra markup or a background color
// the css
h1 {
overflow: hidden;
text-align: center;
}
h1:before,