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 | |
$size = 'large'; | |
$image_ID = get_field('field_name'); // when using ACF, choose 'Image ID' for return value | |
$image_array = wp_get_attachment_image_src($image_ID, $size); | |
$image_URL = $image_array[0]; | |
echo $image_URL; | |
?> |
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
.forms li input, .forms li textarea { | |
font-size: 16px; // was 15px | |
padding: .66em 1em; // was 15px | |
} | |
form#form-vlc-race-registration label.field_label { | |
margin: 1em 0 0 0; // was 16px 0 3px 0 | |
} | |
form#form-vlc-race-registration h2 { |
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 | |
// Register support for Gutenberg wide images in your theme | |
function mytheme_setup() { | |
add_theme_support( 'align-wide' ); | |
} | |
add_action( 'after_setup_theme', 'mytheme_setup' ); |
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
// settings | |
$remBase: 16; //set base font size. unitless value in pixels. | |
$widthMin: 480; //set small breakpoint. unitless value in pixels. | |
$widthMax: 1024; //set large breakpoint. unitless value in pixels. | |
@mixin font-size($valueMin, $valueMax) { | |
// turn mixin parameters into rem value. | |
$fontMin: $valueMin * $remBase; | |
$fontMax: $valueMax * $remBase; | |
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 | |
// Add styles to the login page | |
function login_css() { ?> | |
<style type="text/css"> | |
/* Change the WP logo to your own */ | |
#login h1 a, .login h1 a { | |
background-image: url('<?php echo get_stylesheet_directory_uri(); ?>/path/to/logo.png'); | |
height: 150px; | |
width: 150px; |
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 | |
/* | |
Official Gravity Forms documentation on get_entries() found here: | |
https://docs.gravityforms.com/api-functions/#get-entries | |
*/ | |
/* Gravity Form ID. */ | |
$form_id = '20'; | |
/* Sorting options avalable but left blank for simplicity. */ |
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
//using PHP | |
<?php echo date('Y'); ?> | |
// using javascript | |
<span id="year"></span> | |
<script> | |
document.getElementById("year").innerHTML = new Date().getFullYear(); | |
</script> |
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
/* This is the default headline size. */ | |
.headline, | |
.headline--normal { | |
font-size: 2em; | |
} | |
/* When the headline is shorter, make the font-size larger */ | |
.headline--short { | |
font-size: 2.5em; | |
} | |
/* When the headline is longer, make the font-size smaller */ |
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_rows('gallery') ): ?> | |
<div class="gallery"> | |
<?php while( have_rows('gallery') ): the_row(); ?> | |
<div class="gallery__row" style="display: flex;"> | |
<?php if( have_rows('image_row') ): ?> | |
<?php while( have_rows('image_row') ): the_row(); ?> |
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
<p>Get the contents of <code>/wp-content/themes/webguard-ra-theme/sass/typography/_font-size.scss</code></p> | |
<pre class="has-small-font-size" id="myelement"></pre> | |
Using this code: | |
<pre class="has-small-font-size"> | |
$( document ).ready(function() { | |
jQuery.get("/wp-content/themes/webguard-ra-theme/sass/typography/_font-size.scss", undefined, function(data) { | |
$('#myelement').append(data); | |
}, "html"); | |
});</pre> |