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
function rentfetch_available_units_label( $number ) { | |
$number = intval( $number ); | |
if ( 0 === $number || empty( $number ) ) { | |
$available = 'No units available'; | |
} elseif ( 1 === $number ) { | |
$available = '1 unit available'; | |
} else { | |
$available = $number . ' units available'; |
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
function singular_template_floorplans() { | |
if ( have_posts() ) { | |
while ( have_posts() ) { | |
the_post(); | |
global $post; | |
echo '<div class="single-floorplans-container-outer container-current-floorplan-info">'; |
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
/* Floor Plans Sold Out Red Banner */ | |
.floorplans-loop .type-floorplans.no-units-available:before { | |
background: #E4440F; | |
content: "Sold out"; | |
top: 50%; | |
left: 50%; | |
position: absolute; | |
z-index: 10; | |
padding: 12px 17px; | |
color: white; |
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 | |
/** | |
* The template used for displaying page content in page.php | |
* | |
* @package Genesis Block Theme | |
*/ | |
?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
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
//* Disable fullscreen mode | |
add_action( 'enqueue_block_editor_assets', 'elodin_disable_fullscreen_mode' ); | |
function elodin_disable_fullscreen_mode() { | |
if ( !is_admin() ) | |
return; | |
$script = " | |
jQuery( window ).load(function() { | |
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
.single-properties-wrap { | |
width: 100%; | |
max-width: 1200px; | |
margin-left: auto; | |
margin-right: auto; | |
} |
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
// Get all the iframes present on the page | |
const iframes = document.querySelectorAll('iframe'); | |
// Loop through each iframe to check if it contains "youtube.com" in its src | |
for (const iframe of iframes) { | |
const src = iframe.getAttribute('src'); | |
if (src.includes('youtube.com')) { | |
// Append ?rel=0 to the existing src | |
const modifiedSrc = src + '?rel=0'; | |
iframe.setAttribute('src', modifiedSrc); |
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 | |
remove_action( 'rentfetch_do_single_properties', 'rentfetch_single_property_basic_info', 30 ); | |
add_action( 'rentfetch_do_single_properties', 'bankier_single_property_basic_info', 30 ); | |
function bankier_single_property_basic_info() { | |
// bail if this section isn't set to display | |
$single_property_components = get_field( 'single_property_components', 'option' ); | |
if ( $single_property_components['enable_basic_info_display'] === false ) | |
return; |
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 | |
function show_takeout_info() { | |
$food_drink = get_field( 'food_drink' ); | |
// bail if no takeout info | |
if ( !isset( $food_drink['take_out'] ) ) | |
return; | |
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
/** | |
* Force first page of results in archives to an odd number, later pages to an even number | |
*/ | |
add_action( 'pre_get_posts', 'elodin_change_posts_number_home_page_to_odd' ); | |
function elodin_change_posts_number_home_page_to_odd( $query ) { | |
// only modify the query if it's the main query | |
if ( !is_admin() && $query->is_main_query() ) { | |
NewerOlder