This file contains 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="info-box"> | |
<?php $krogsquery = new WP_Query( array( | |
'post_type' => 'post', | |
'posts_per_page' => 3 | |
)); ?> | |
<h3 class="info-headline">City News</h3> | |
<?php while($krogsquery->have_posts()) : $krogsquery->the_post(); ?> |
This file contains 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 <?php if ( get_field('field_name') ) { echo 'style="background-image: url(' . get_field('field_name') . ')"'; } ?> class="hero container"> | |
<h2>I Need a Hero</h2> | |
<p>I'm holding out for a hero 'til the end of the night</p> | |
</div> | |
source: http://www.endocreative.com/how-to-empower-clients-to-easily-customize-background-images/ |
This file contains 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
html, body {background-color:<?php the_field('page_background_color', 'option' );?>;} |
This file contains 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 | |
/* Simple script to upload a zip file to the webserver and have it unzipped | |
Saves tons of time, think only of uploading Wordpress to the server | |
Thanks to c.bavota (www.bavotasan.com) | |
I have modified the script a little to make it more convenient | |
Modified by: Johan van de Merwe (12.02.2013) | |
*/ | |
function rmdir_recursive($dir) { | |
foreach(scandir($dir) as $file) { |
This file contains 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 $my_query = new WP_Query('page_id=87'); | |
while ($my_query->have_posts()) : $my_query->the_post(); | |
$do_not_duplicate = $post->ID;?> | |
<div class="entry"> | |
<?php the_content('read more »'); ?> | |
</div> |
This file contains 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
<section class="col-xs-12 col-sm-5 col-md-7"> | |
<h2>Mini Gallery</h2> | |
<?php | |
$images = get_field('gallery'); | |
$divider = 8; // # of items/thumbnails to show before closing the element and opening another | |
if( $images ): ?> | |
<div id="mini-carousel" class="carousel slide" data-ride="carousel"> | |
<ul class="carousel-inner"> |
This file contains 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
add_filter( 'woocommerce_subcategory_count_html', 'jk_hide_category_count' ); | |
function jk_hide_category_count() { | |
// No count | |
} |
This file contains 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
git config --global --unset http.proxy | |
git config --global -l |
This file contains 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
npm install npm@latest -g |
This file contains 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
<img src="<?php echo get_bloginfo( 'template_directory' ); ?>/images/morebutton.png" /> |