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 set_featured_image_from_gallery() { | |
$has_thumbnail = get_the_post_thumbnail($post->ID); | |
if ( !$has_thumbnail ) { | |
$images = get_field('gallery', false, false); | |
$image_id = $images[0]; | |
if ( $image_id ) { | |
set_post_thumbnail( $post->ID, $image_id ); |
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
(1) | |
<?php | |
$imageArray = get_field('footer_logo', 'options'); | |
$imageAlt = $imageArray['alt']; | |
$imageURL = $imageArray['sizes']['thumbnail']; | |
?> | |
<img src="<?php echo $imageURL;?>" alt="<?php echo $imageAlt; ?>"> | |
(2) | |
<?php |
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
(1) | |
<?php | |
$imageArray = get_field('footer_logo', 'options'); | |
$imageAlt = $imageArray['alt']; | |
$imageURL = $imageArray['sizes']['thumbnail']; | |
?> | |
<img src="<?php echo $imageURL;?>" alt="<?php echo $imageAlt; ?>"> | |
(2) | |
<?php |
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
} elseif (is_tax('flooring-type')) { | |
$queried_object = get_queried_object(); | |
return $queried_object->name; |
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
article { | |
.featured-image { | |
position: relative; | |
&:before { | |
.transition(all 0.3s ease); | |
position: absolute; | |
top: 0; | |
left: 0; | |
right: 0; | |
bottom: 0; |
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 show_widget_classes() { | |
global $wp_registered_widgets; | |
$widgets = array(); | |
if(is_array($wp_registered_widgets)){ | |
foreach($wp_registered_widgets as $widg){ | |
if(!empty($widg['callback'])){ | |
if(!empty($widg['callback'][0])){ | |
$class = get_class($widg['callback'][0]); | |
if(!array_key_exists($class, $widgets)){ | |
$widgets[$class] = $widg['callback'][0]->name; |
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 unregister_default_wp_widgets() { | |
unregister_widget('WP_Widget_Pages'); | |
unregister_widget('WP_Widget_Calendar'); | |
unregister_widget('WP_Widget_Archives'); | |
unregister_widget('WP_Widget_Links'); | |
unregister_widget('WP_Widget_Meta'); | |
unregister_widget('WP_Widget_Categories'); | |
unregister_widget('WP_Widget_Recent_Comments'); | |
unregister_widget('WP_Widget_Tag_Cloud'); | |
unregister_widget('WP_Widget_RSS'); |