This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'manage_edit-magazine_columns', 'make_columns_filter', 10, 1 ); | |
add_filter( 'manage_edit-projects_columns', 'make_columns_filter', 10, 1 ); | |
add_filter( 'manage_edit-review_columns', 'make_columns_filter', 10, 1 ); | |
function make_columns_filter( $columns ) { | |
$post_parent = array( 'post_parent' => 'Post Parent' ); | |
$columns = array_slice( $columns, 0, 2, true ) + $post_parent + array_slice( $columns, 2, NULL, true ); | |
return $columns; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'post_type' => 'magazine', | |
'title' => 'Articles', | |
'post_parent' => $post->ID, | |
'order' => 'asc', | |
'meta_key' => 'PageNumber', | |
'orderby' => 'meta_value_num' | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args = array( | |
'category__in' => $cat_ID, | |
'posts_per_page' => 8, | |
'no_found_rows' => true, | |
); | |
$the_query = new WP_Query( $args ); | |
//Maybe array_chunk isn't the right thing to do here... | |
$arrays = array_chunk( $the_query->posts, 4, true ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$('.container .row .span8').removeClass('span8').addClass('span12'); | |
}); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class="row"> | |
<div class="span8"> | |
<form> | |
<fieldset> | |
<legend>Legend</legend> | |
<label>Label name</label> | |
<input type="text" placeholder="Type something…"> | |
<span class="help-block">Example block-level help text here.</span> | |
<label class="checkbox"> |

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package MakeZine | |
* Template Name: Arduino RSS | |
*/ | |
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); $more = 1; echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?> | |
<rss version="2.0" | |
xmlns:content="http://purl.org/rss/1.0/modules/content/" | |
xmlns:wfw="http://wellformedweb.org/CommentAPI/" | |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$numbers = range(1,100); | |
foreach($numbers as $number) { | |
if( $number % 15 == 0 ) { | |
echo 'FizzBuzz<br />'; | |
} elseif( $number % 5 == 0 ) { | |
echo 'Buzz<br />'; | |
} elseif( $number % 3 == 0 ) { | |
echo 'Fizz<br />'; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function make_post_add_review($content) { | |
global $post; | |
if ('post' == get_post_type()) { | |
$guide = get_post_custom_values('MakeProjectsGuideNumber'); | |
if (isset($guide[0])) { | |
$content .= js_make_project($guide); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
/* <![CDATA[ */ | |
// Leader ad declaration | |
var slot1= googletag.defineSlot('/11548178/MakeProjects' + | |
'', [[728,90]], | |
'div-gpt-ad-leader').addService(googletag.pubads()).setTargeting('pos', 'atf'); | |
// Corner ad declaration | |
var slot2= googletag.defineSlot('/11548178/MakeProjects' + | |
'', [[190,90]], | |
'div-gpt-ad-corner').addService(googletag.pubads()).setTargeting('pos', 'atf'); |