Skip to content

Instantly share code, notes, and snippets.

View ahaywood's full-sized avatar

Amy Haywood Dutton ahaywood

View GitHub Profile
@ahaywood
ahaywood / CSS: Media Query - Desktops and Laptops
Last active December 12, 2015 10:18
CSS: Media Query - Desktops and Laptops
/* Desktops and laptops ----------- */
@media only screen and (min-width : 1224px) {
/* Styles */
}
@ahaywood
ahaywood / CSS: Media Query - iPad (portrait)
Last active December 12, 2015 10:19
CSS: Media Query - iPad (portrait)
/* iPads (portrait) ----------- */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
/* Styles */
}
@ahaywood
ahaywood / CSS: Media Query - iPad (landscape)
Last active December 12, 2015 10:19
CSS: Media Query - iPad (landscape)
/* iPads (landscape) ----------- */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {
/* Styles */
}
@ahaywood
ahaywood / CSS: Media Query - iPad (portrait and landscape)
Last active December 12, 2015 10:19
CSS: Media Query - iPad (portrait and landscape)
/* iPads (portrait and landscape) ----------- */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
/* Styles */
}
@ahaywood
ahaywood / CSS: Media Query - Smartphones (portrait)
Last active December 12, 2015 10:19
CSS: Media Query - Smartphones (portrait)
/* Smartphones (portrait) ----------- */
@media only screen and (max-width : 320px) {
/* Styles */
}
@ahaywood
ahaywood / CSS: Media Query - Smartphones (landscape)
Last active January 25, 2018 16:45
CSS: Media Query - Smartphones (landscape)
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 321px) {
/* Styles */
}
@ahaywood
ahaywood / CSS: Media Query - Smartphones (portrait and landscape)
Last active December 12, 2015 10:19
CSS: Media Query - Smartphones (portrait and landscape)
/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
/* Styles */
}
@ahaywood
ahaywood / CSS: Target iPad
Last active December 12, 2015 10:09
CSS: Target iPad
@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait) {
/* your css rules for ipad portrait */
}
@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:landscape) {
/* your css rules for ipad landscape */
}
@ahaywood
ahaywood / PHP: WP - Contact 7 Shortcode in PHP
Last active December 11, 2015 18:09
PHP: WP - Contact 7 Shortcode in PHP
<?php echo do_shortcode( '[contact-form-7 id="12" title="Contact Form"]' ); ?>
@ahaywood
ahaywood / PHP: WP - Generic Loop
Last active December 11, 2015 13:49
PHP: WP - Generic Loop
// WORDPRESS LOOP
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
<?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>
<div class="entry">