Skip to content

Commit

Permalink
Merge pull request #263 from wikitongues/feature/careers-tweaks
Browse files Browse the repository at this point in the history
make application url title editable
  • Loading branch information
FredericoAndrade authored Dec 5, 2024
2 parents 0a83525 + a2a3a8c commit 85bae06
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,26 @@
"placeholder": "",
"prepend": "",
"append": ""
},
{
"key": "field_67520eaa530ee",
"label": "Application URL",
"name": "application",
"aria-label": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"maxlength": "",
"placeholder": "",
"prepend": "",
"append": ""
}
]
},
Expand Down Expand Up @@ -382,5 +402,5 @@
"active": true,
"description": "",
"show_in_rest": 0,
"modified": 1733430014
"modified": 1733430987
}
70 changes: 35 additions & 35 deletions wp-content/themes/blankslate-child/single-careers.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,45 @@
function render_section($field_name, $headers, $page_id = null) {
$field_value = get_field($field_name, $page_id);
$title_value = $headers[$field_name];
if ($field_value) {
echo "<section class='" . esc_attr($field_name) . "'>";
echo "<h2>" . esc_attr($title_value) . "</h2>";
echo wpautop(wp_kses_post($field_value));
echo "</section>";
}
if ($field_value) {
echo "<section class='" . esc_attr($field_name) . "'>";
echo "<h2>" . esc_attr($title_value) . "</h2>";
echo wpautop(wp_kses_post($field_value));
echo "</section>";
}
}

if (have_posts()) :
while (have_posts()) : the_post();
?>
<div class="career-post">
<a href="<?php echo home_url('/careers', 'relative'); ?>">Back to Careers</a>
<h1 class="career-title"><?php the_title(); ?></h1>
<section>
<?php echo "<h2>" . $headers["posted_date"] . "</h2>";?>
<time datetime="<?php echo get_the_date('c'); ?>" itemprop="datePublished"><?php echo get_the_date(); ?></time>
</section>
<?php
render_section('location', $headers);
render_section('deadline', $headers);
render_section('why_wikitongues', $headers, $list_page_id);
render_section('team_description', $headers);
render_section('role_description', $headers);
render_section('requirements', $headers);
render_section('compensation', $headers);
render_section('about_wikitongues', $headers, $list_page_id);
render_section('dei', $headers, $list_page_id);
?>
while (have_posts()) : the_post();
?>
<div class="career-post">
<a href="<?php echo home_url('/careers', 'relative'); ?>">Back to Careers</a>
<h1 class="career-title"><?php the_title(); ?></h1>
<section>
<?php echo "<h2>" . $headers["posted_date"] . "</h2>";?>
<time datetime="<?php echo get_the_date('c'); ?>" itemprop="datePublished"><?php echo get_the_date(); ?></time>
</section>
<?php
render_section('location', $headers);
render_section('deadline', $headers);
render_section('why_wikitongues', $headers, $list_page_id);
render_section('team_description', $headers);
render_section('role_description', $headers);
render_section('requirements', $headers);
render_section('compensation', $headers);
render_section('about_wikitongues', $headers, $list_page_id);
render_section('dei', $headers, $list_page_id);
?>

<section class="career-application">
<h2>Application</h2>
<a href="<?php echo esc_url(get_field('application')); ?>" target="_blank">
Apply Here
</a>
</section>
</div>
<?php
endwhile;
<section class="career-application">
<?php echo "<h2>" . $headers["application"] . "</h2>";?>
<a href="<?php echo esc_url(get_field('application')); ?>" target="_blank">
Apply Here
</a>
</section>
</div>
<?php
endwhile;
endif;

include('modules/newsletter.php');
Expand Down

0 comments on commit 85bae06

Please sign in to comment.