Skip to content

Instantly share code, notes, and snippets.

View jonschr's full-sized avatar

Jon Schroeder jonschr

View GitHub Profile
<?php
function prf_register_repeater_first_name( $form_id ) {
return GF_Fields::create( array(
'type' => 'text',
'id' => 1001, // The Field ID must be unique on the form
'formId' => $form_id,
'label' => 'First Name',
'pageNumber' => 1, // Ensure this is correct
'isRequired' => true,
<?php
// Adjust your form ID
function prf_add_people_repeater( $form ) {
$form_ids = get_conference_connected_gform_ids();
if ( ! in_array( $form['id'], $form_ids ) ) {
return $form; // Exit if the form ID is not in the list
}
<Schedule>
<Origins>
<origin_rcd>MRY</origin_rcd>
<country_rcd>US</country_rcd>
<display_name>Carmel - Monterey</display_name>
<currency_rcd>USD</currency_rcd>
<routes_tot>2</routes_tot>
<routes_avl>2</routes_avl>
<routes_b2c>2</routes_b2c>
<div id="map" style="height: 500px; width: 100%"></div>
<script>
function initMap() {
const map = new google.maps.Map(document.getElementById('map'), {
center: { lat: 40.0076, lng: -105.265 }, // CU Boulder coordinates
zoom: 14,
});
// Add a shaded area (polygon for CU Boulder campus)
const polygonCoords = [
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';
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">';
@jonschr
jonschr / customize.css
Created July 10, 2024 04:01
Add sold out banner
/* 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;
<?php
/**
* The template used for displaying page content in page.php
*
* @package Genesis Block Theme
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
//* 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() {
.single-properties-wrap {
width: 100%;
max-width: 1200px;
margin-left: auto;
margin-right: auto;
}