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 | |
$tax_name = 'tax_name'; | |
$terms = get_terms($tax_name); | |
$count = count($terms); | |
if ( $count > 0 ){ | |
foreach ( $terms as $term ) { | |
echo '<section class="' . $term->name . '">'; | |
echo '<h2 class="section-title">' . $term->name . '</h2>'; | |
echo '<ul>'; |
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
/* | |
---------------------------------------------------------------- | |
Gravity Forms Front End Form Styles | |
Version 1.7 | |
http: //www.gravityforms.com | |
updated: April 22, 2013 5:19 PM | |
*/ |
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
// Gravity Forms style sheet | |
wp_register_style( 'gravity-forms', get_stylesheet_directory_uri() . '/library/css/gravity-forms.css', array(), '' ); | |
// only load on contact page | |
if(is_page('contact')){ | |
wp_enqueue_style('gravity-forms'); | |
} |
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 $images = get_field('gallery'); if( $images ): ?> | |
<ul class="thumb-grid"> | |
<?php foreach( $images as $image ): ?> | |
<li> | |
<a href="<?php echo $image['url']; ?>"> | |
<img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>"> | |
</a> | |
</li> | |
<?php endforeach; ?> | |
</ul> |
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 | |
/* | |
* Basic WordPress Widget Code | |
* Save to: /wp-content/theme/widgets.php | |
* in functions.php or appropriate place: if ($wp_version >= 2.8) require_once(TEMPLATEPATH.'/widgets.php'); | |
* | |
*/ | |
class MyWidgetName extends WP_Widget | |
{ |
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 | |
/* | |
* Password protect a WordPress site, with a redirect to the requested URL after successful login | |
* | |
* Based on: | |
* http://wordpress.stackexchange.com/a/64999 | |
* http://kovshenin.com/2012/current-url-in-wordpress/ | |
* | |
**/ |
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 | |
$args = array( | |
'post_type' => 'attachment', | |
'numberposts' => -1, | |
'post_status' => null, | |
'post_parent' => $post->ID | |
); | |
$attachments = get_posts( $args ); |
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 | |
// Numeric Page Navigation | |
function bones_page_navi() { | |
global $wp_query; | |
$bignum = 999999999; | |
if ( $wp_query->max_num_pages <= 1 ) | |
return; | |
echo '<nav class="pagination">'; | |