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
function cpt_book_init() { | |
$labels = array( | |
'name' => 'Books', | |
'singular_name' => 'Book', | |
'menu_name' => 'Books', | |
'name_admin_bar' => 'Book', | |
'add_new' => 'Add New', 'book', | |
'add_new_item' => 'Add New Book', | |
'new_item' => 'New Book', | |
'edit_item' => 'Edit Book', |
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
$image = get_field('image'); | |
$image['alt'] = ( empty($image['alt']) ? "\x20" : $image['alt'] ); | |
echo "<img src='" . $image['sizes']['medium'] . "' alt='" . $image['alt'] . "'>"; |
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
// Genre Custom Taxonomy Definition | |
function create_book_taxonomies() { | |
// Add new taxonomy, make it hierarchical (like categories) | |
$labels = array( | |
'name' => _x( 'Genres', 'taxonomy general name' ), | |
'singular_name' => _x( 'Genre', 'taxonomy singular name' ), | |
'search_items' => __( 'Search Genres' ), | |
'all_items' => __( 'All Genres' ), | |
'parent_item' => __( 'Parent Genre' ), | |
'parent_item_colon' => __( 'Parent Genre:' ), |
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
.page-navigation { | |
ol { | |
position:relative; | |
text-align:center; | |
@include breakpoint(multiColumn) { margin:0 auto; } | |
} | |
li { | |
display: inline-block; |
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 if (get_field('gravity_form')) : ?> | |
<div id="contact-form"> | |
<?php | |
$contactForm = get_field('gravity_form'); | |
gravity_form( | |
$contactForm->id, | |
$display_title=true, | |
$display_description=false, |
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 if (have_posts()) : ?> | |
<?php while (have_posts()) : the_post(); ?> | |
<?php endwhile; ?> | |
<?php endif; wp_reset_postdata(); ?> |
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 | |
// ACF Repeater Field to Flex Slider. | |
$repeaterFieldName = 'history_gallery'; | |
$pageId = NULL; // Just in case, use only if needed. | |
$imageFieldName = 'image'; | |
$imageSize = 'medium'; | |
$repeater = get_field($repeaterFieldName, $pageId); |
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
/wp-content/themes/yb/library/_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
# Single Page | |
Redirect 301 /oldpage2.html http://www.yoursite.com/folder/ | |
# Whole Site | |
Redirect 301 / http://newsite.com/ |
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
$mobileColumn: 400; | |
$narrowColumn: 700; | |
$multiColumn: 1000; | |
$mainWidth: $narrowColumn - 40; | |
$multiWidth: $multiColumn - 40; | |
$narrowWidth: 95%; | |
$mobileWidth: 90%; | |
@mixin breakpoint($point) { |
NewerOlder