Skip to content

Instantly share code, notes, and snippets.

@corpsefilth
corpsefilth / wpattachedsamples.php
Created September 18, 2015 21:52
display list of attached images of a page or post excluding featured image
<?php
//get featured image ID
$thumb_ID = get_post_thumbnail_id( $post->ID );
//attachement loop - with exclude argument for featured image
$args = array(
'orderby' => 'menu_order',
'post_type' => 'attachment',
'post_parent' => get_the_ID(),
'post_mime_type' => 'image',
@corpsefilth
corpsefilth / mediaqueriesextended.css
Created September 18, 2015 21:55
Extended CSS Media Queries Reference
/* --------------------------------------------------------- */
/* BASIC CSS ----------------------------------------------- */
/* --------------------------------------------------------- */
/* YOUR STYLES */
@corpsefilth
corpsefilth / mediaqueries.css
Created September 18, 2015 22:03
Simple CSS media queries for mobile devices
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@corpsefilth
corpsefilth / press-items.html
Created November 9, 2016 01:20
Press Item Code Snippets
working code sample
<div class="col col-md-3 col-sm-6 col-xs-12 press-item editorial digital wrapper featured">
<div class="pressitemholder press-padder">
<a href="{{media url='wysiwyg/press/Online_WhoWhatWear-2.9.16.jpg'}}" title="WHO WHAT WEAR February 2016" class="lightbox pressanchor"></a>
<img src="{{media url="wysiwyg/press/Online_WhoWhatWear-2.9.16.jpg"}}" alt="" />
<div class="press-item-title">
<div class="press-title-wrap">
<span class="maintitle">WHO WHAT WEAR</span>
<span class="subtitle">February 2016</span>
</div>
@corpsefilth
corpsefilth / spConfigIndex.js
Created April 16, 2015 02:14
configurable swatches magento 1.9.1, make first option selected by default -- BETA -- not for production, you will need to make slight mods.
function fireEvent(element,event)
{
if (document.createEventObject)
{
// dispatch for IE
var evt = document.createEventObject();
return element.fireEvent('on'+event,evt);
}
else
{