Skip to content

Instantly share code, notes, and snippets.

View zachakbar's full-sized avatar
👻
...

{...} zachakbar

👻
...
View GitHub Profile
@zachakbar
zachakbar / styled-select.scss
Created February 12, 2018 23:58
Styled select box.
$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%;
@zachakbar
zachakbar / acf-oembed.php
Last active June 2, 2023 16:26
ACF oEmbed script w/ player parameters
<?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);
@zachakbar
zachakbar / acf-options-page.php
Last active March 6, 2018 21:45
Add custom options page to WordPress with ACF.
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'
));
}