- Upload the CSS.
- Add the following function to functions.php.
function admin_style() {
wp_enqueue_style('admin_style', get_stylesheet_directory_uri().'PATH/TO/acf-checkbox-radio-columns.css');
}
add_action('admin_init', 'admin_style');
if( function_exists('acf_add_options_page') ) { | |
acf_add_options_page(array( | |
'page_title' => 'PAGE_TITLE', | |
'menu_title' => 'MENU_TITLE', | |
'menu_slug' => 'PAGE_SLUG', | |
'capability' => 'edit_posts', | |
'redirect' => false, | |
'parent_slug' => 'options-general.php' | |
)); | |
} |
<?php | |
/** | |
* ACF oEmbed script w/ player parameters | |
* @link https://www.advancedcustomfields.com/resources/oembed/ | |
*/ | |
$video = get_field('video'); | |
// use preg_match to find iframe src | |
preg_match('/src="(.+?)"/', $video, $matches); |
$grey: rgb(153,153,153); | |
$lightgrey: rgb(204,204,204); | |
$white: rgb(255,255,255); | |
$blue: rgb(0,188,188); | |
.styled-select { | |
background: $white url("../img/select-arrow.png") right center no-repeat; | |
border: $input_border; | |
border-radius: 5px; | |
width: 100%; |
// init empy git repo | |
git init | |
// connect repo to project | |
git remote add origin PROJECT_URL | |
// checkout branch | |
git fetch && git checkout BRANCH_NAME | |
// check working status |
<?php echo '<pre>';print_r(get_intermediate_image_sizes());echo '</pre>'; ?> |
<section class="type-style-checker"> | |
<h1>Heading 1</h1> | |
<h2>Heading 2</h2> | |
<h3>Heading 3</h3> | |
<h4>Heading 4</h4> | |
<h5>Heading 5</h5> | |
<h6>Heading 6</h6> | |
<p>A paragraph (from the Greek paragraphos, "to write beside" or "written beside") is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. Though not required by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.</p> | |
<p><a href="#">Sample Text Link</a></p> | |
</section> |
// Needs some tweaking per project. | |
function initSlickSlider(clsSlider,smSlides,mdSlides,lgSlides){ | |
// init Slick slider | |
$(clsSlider).each(function (idx, item) { | |
var s = smSlides; | |
var m = mdSlides; | |
var l = lgSlides; | |
var carouselId = "carousel" + idx; | |
this.id = carouselId; |
<?php | |
/** | |
* @link https://snippets.khromov.se/sanitizing-and-securing-advanced-custom-fields-output/ | |
* @link https://codex.wordpress.org/Validating_Sanitizing_and_Escaping_User_Data | |
*/ | |
/** | |
* Helper function to sanitize data output by the get_field() function also normalize values. | |
* | |
* @param $field_key |