Skip to content

Instantly share code, notes, and snippets.

View samediamba's full-sized avatar

Samedi S. Amba samediamba

View GitHub Profile
/** To use a separate single post template for each category, you will need to add the following function in your functions.php: **/
/**
* Define a constant path to our single template folder
*/
define(SINGLE_PATH, TEMPLATEPATH . '/single');
/**
* Filter the single_template with our custom function
*/
@samediamba
samediamba / Responsive Iframes
Created June 7, 2013 09:41
What I recently used to make responsive Iframes for my Google docs embed. This happened as I was doing the UEAB site.
/* RESPONSIVE IFRAME GIST
---------------------
Useful Links:
Responsive Embeds: http://amobil.se/2011/11/responsive-embeds/
Creating Intrinsic Ratios for Video: http://alistapart.com/article/creating-intrinsic-ratios-for-video */
/* STEP 1: Grab the Embed. Go to https://docs.google.com/viewer and paste in URL to the document. looks like below:*/
<iframe src="http://docs.google.com/viewer?url=ueab.ac.ke%2Fdownloads%2Ffinal-bulletin-2013.pdf&embedded=true" width="600" height="780" style="border: none;"></iframe>