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="row"> | |
<?php | |
// ACF_REPEATER_FIELD_NAME Repeater | |
if( get_field( 'ACF_REPEATER_FIELD_NAME' ) ): | |
// Get number of items from the result | |
$numItems = sizeof( get_field( 'ACF_REPEATER_FIELD_NAME' ) ); | |
// Divied by 2 and round up to distribute evenly between the columns | |
$itemsPerColumn = round( $numItems/2 ); | |
// Intialize an iterator for displacing an odd number of results |
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
if ( ! function_exists( 'cpt_archives_settings' ) ) : | |
add_action( 'pre_get_posts', 'themename_cpt_archives_settings' ); | |
// Pass the $query argument into the action. | |
function themename_cpt_archives_settings( $query ) { | |
// Define the context. | |
// Not on dashboard pages when inside the main query only on cpt archives. | |
if( ! is_admin() && $query->is_main_query() && is_post_type_archive( 'cpt_name_goes_here' ) ) { |
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 | |
/** | |
* The template for displaying all pages. | |
* | |
* This is the template that displays all pages by default. | |
* Please note that this is the WordPress construct of pages | |
* and that other 'pages' on your WordPress site will use a | |
* different template. | |
* | |
* Additionally this template will try to retrieve the any |
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 ACF Fields to Keyword evaluation for Yoast SEO Plugin | |
* @link https://imperativeideas.com/making-custom-fields-work-yoast-wordpress-seo/ | |
*/ | |
if ( is_admin() && defined('WPSEO_VERSION') ) { // check to make sure we aren't on the front end | |
add_filter('wpseo_pre_analysis_post_content', 'add_acf_to_yoast'); |
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
<header>Header</header> | |
<nav>Nav</nav> | |
<article>Article</article> | |
<footer>Footer</footer> |
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
<nav class="site-nav"> | |
<ul class="main-menu"> | |
<li class="main-menu__item main-menu__item_home"> | |
<a class="main-menu__anchor" href="#">HOME</a> | |
</li> | |
<li class="main-menu__item main-menu__item_products"> | |
<a class="main-menu__anchor" href="#">PRODUCTS</a> | |
</li> | |
<li class="main-menu__item main-menu__item_about"> | |
<a class="main-menu__anchor" href="#">ABOUT</a> |
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
<!-- START SLIDE FUNCTIONALITY --> | |
<script src="http://code.jquery.com/jquery-latest.min.js"></script> | |
<script src="/storage/js/slides.jquery.js"></script> | |
<script> | |
$(function () { | |
$('#slides').slides({ | |
preload: true, | |
preloadImage: '/storage/js/loading.jpg', | |
autoHeight: true, | |
autoHeightSpeed: 350, |
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
<!-- START SLIDE FUNCTIONALITY --> | |
<script type src="http://code.jquery.com/jquery-latest.min.js"></script> | |
<script src="/storage/js/slides.jquery.js"></script> | |
<script> | |
$(function () { | |
$('#slides').slides({ | |
preload: true, | |
preloadImage: '/storage/js/loading.jpg', | |
autoHeight: true, | |
autoHeightSpeed: 350, |
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
/* Attribution: http://wordpress.stackexchange.com/a/37768/35516 */ | |
.entry-content img, | |
.comment-content img, | |
.widget img { | |
max-width: 97.5%; /* Fluid images for posts, comments, and widgets */ | |
} | |
img[class*="align"], | |
img[class*="wp-image-"] { | |
height: auto; /* Make sure images with WordPress-added height and width >attributes are scaled correctly */ | |
} |
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 | |
/** | |
* Updates the v= query string for | |
* theme's default stylesheet for | |
* browser cache busting etc. | |
*/ | |
function theme_wp_default_styles_version($styles) { | |
// use date versioning or semantic versioning |
OlderNewer