The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
<?php // check if the flexible content field has rows of data | |
if( get_field('flexible_content') ): | |
// loop through the rows of data | |
while ( has_sub_field('flexible_content') ) : | |
if( get_row_layout() == 'copy' ): | |
get_template_part('partials/copy', 'block'); |
⠀⠀⠀⠀⠀⠀⠀⣠⠂⠉⠁⢢ | |
⠀⠀⠀⠀⠀⠀⠀⡆⠀⠀⠀⢸ | |
⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠸ | |
⠀⠀⣀⣀⣀⣀⣠⠇⠀⠀⠀⢠⡀ | |
⢰⠏⣰⠉⠀⠀⠸⠀⠀⡀⠀⢀⠏⠉⠑⡖⠒⠄ | |
⠌⠀⡇⠀⠀⠀⠀⠂⠀⠀⠀⠸⠀⠀⠀⡇⠀⠈⢦ | |
⡀⠀⠷⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⠡⠀⠀⠈⣇ | |
⠉⢺⡅⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⢰⡇ | |
⠀⠀⠙⠺⣥⢄⠀⠀⠈⠉⠉⠀⠀⠉⢀⠎⠀⠀⠞ | |
⠀⠀⠀⠀⠈⠑⠢⠄⣀⣀⣀⣀⠤⠤⠤⠔⠊⠁ |
<?php | |
$the_query = new WP_Query(array( | |
'post_type' => 'page', | |
'post_parent' => '9947' | |
)); | |
while ($the_query->have_posts()) | |
{ ?> | |
<div class="d-1of3"> | |
<?php $the_query->the_post(); |
....................../´¯/) | |
....................,/¯../ | |
.................../..../ | |
............./´¯/'...'/´¯¯`·¸ | |
........../'/.../..../......./¨¯\ | |
........('(...´...´.... ¯~/'...') | |
.........\.................'...../ | |
..........''...\.......... _.·´ | |
............\..............( | |
..............\.............\ |
<!-- | |
__ __ _ __ ___ __ _____ __ ________ | |
/ / ___ / /( )_____ / |/ /___ _/ /_____ / ___// /___ __/ __/ __/ | |
/ / / _ \/ __/// ___/ / /|_/ / __ `/ //_/ _ \ \__ \/ __/ / / / /_/ /_ | |
/ /___/ __/ /_ (__ ) / / / / /_/ / ,< / __/ ___/ / /_/ /_/ / __/ __/ | |
/_____/\___/\__/ /____/ /_/ /_/\__,_/_/|_|\___/ /____/\__/\__,_/_/ /_/ | |
http://iredale.co | |
--> |
default android/drawable-mdpi/, 150% android/drawable-hdpi/, 200% android/drawable-xhdpi/, 300% android/drawable-xxhdpi/, 400% android/drawable-xxxhdpi/, 100% iphone/, 200% iphone/@2x, 300% iphone/@3x |
<script> | |
$('option').each(function(){ // Choose what kind of tag this is already in | |
var sort = $(this).text().replace(/Sort by/g,"<div class="bold">Sort by</div>"); | |
$(this).html(sort); | |
}); | |
</script> |
<script> | |
jQuery(document).bind('gform_post_render', function(){ | |
// destroy default Gravity Form datepicker | |
jQuery("#input_2_3").datepicker('destroy'); | |
// create new custom datepicker | |
var oneWorkingDays = new Date(); | |
var adjustments = [0, 1, 1, 1, 1, 1, 0]; // Offsets by day of the week | |
oneWorkingDays.setDate(oneWorkingDays.getDate() + 1 + adjustments[oneWorkingDays.getDay()]); | |
jQuery("#input_2_3").datepicker({ beforeShowDay: jQuery.datepicker.noWeekends, minDate: '+1d', gotoCurrent: true, prevText: '', showOn: 'both', buttonImage: '/wp-content/plugins/gravityforms/images/calendar.png', buttonImageOnly: true }); |
<?php | |
$myname = get_post_meta($post->ID, 'header_image', true); | |
if ( $myname ) { ?> | |
<img class="feature" src="<?php the_field('header_image'); ?>"> | |
<?php } | |
else { | |
echo ''; | |
} | |
?> |