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
function themeprefix_acf_input_admin_footer() { | |
?> | |
<script type="text/javascript"> | |
(function($) { | |
acf.add_filter('color_picker_args', function( args, $field ){ | |
// add the hexadecimal codes here for the colors you want to appear as swatches | |
args.palettes = ['#F0F4F9', '#FFFBC5'] |
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_filter("request", "ph_change_term_request", 1, 1); | |
function ph_change_term_request($query) | |
{ | |
$tax_name = "my_tax_name"; | |
if (isset($query["attachment"])) | |
{ | |
$include_children = true; | |
$name = $query["attachment"]; |
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 | |
/* | |
* Creates fake sub pages for a custom post type. | |
*/ | |
// Create 'Fake sub-pages' permalinks and titles. | |
$sub_pages = array( | |
'about' => 'About', | |
'people' => 'People', | |
'information' => 'Information', |
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 opening markup for the Page Header | |
add_action( 'genesis_before_header', 'wwd_opening_page_header' ); | |
function wwd_opening_page_header() { | |
if (is_front_page() || is_search() || is_404() ) { | |
return; | |
} |
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 //<~ Remove me | |
//Removes Title and Description on CPT Archive | |
remove_action( 'genesis_before_loop', 'genesis_do_cpt_archive_title_description' ); | |
//Removes Title and Description on Blog Archive | |
remove_action( 'genesis_before_loop', 'genesis_do_posts_page_heading' ); | |
//Removes Title and Description on Date Archive | |
remove_action( 'genesis_before_loop', 'genesis_do_date_archive_title' ); | |
//Removes Title and Description on Archive, Taxonomy, Category, Tag | |
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); |
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 //<~ Remove me | |
/** | |
* Remove archive title prefixes. | |
* | |
* @param string $title The archive title from get_the_archive_title(); | |
* @return string The cleaned title. | |
*/ | |
function ph_custom_archive_title( $title ) { |
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
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2), | |
only screen and ( min--moz-device-pixel-ratio: 2), | |
only screen and ( -o-min-device-pixel-ratio: 2/1), | |
only screen and ( min-device-pixel-ratio: 2), | |
only screen and ( min-resolution: 192dpi), | |
only screen and ( min-resolution: 2dppx) { | |
.header-image .site-title > a { | |
float: left; | |
min-height: 133px; |
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 | |
$gallery = get_post_meta( get_the_ID(), 'home_slider'); // 'home_slider' is name of my ACF gallery field | |
$image_ids = $gallery[0]; // It's an array within an array | |
// If we have some images loop around and populate a new data array | |
if( is_array( $image_ids )) { | |
$image_ids_string = implode( ',', $image_ids ); // Soliloquy Dynamic requires image IDs to be passed as a comma separated list | |
echo '<div class="gallery-slider">'; | |
soliloquy_dynamic( array( | |
'id' => 'gallery-images', |
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_action( 'genesis_entry_content', 'pbh_do_post_content', 9 ); | |
function pbh_do_post_content() { | |
echo '<div class="slider-container">'; | |
// If at least 1 image is present in the Project Images Gallery field | |
if( $images = get_field('gallery') ) { |
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
a span.screen-reader-text { | |
clip: rect(1px, 1px, 1px, 1px); | |
position: absolute !important; | |
height: 1px; | |
width: 1px; | |
overflow: hidden; | |
} |
NewerOlder