Job Post Feed Template
Wordpress template
<?php /* Template Name: Job Posts Listing */ get_header(); ?>
<main>
<?php
# An example to show that the template could use Wordpress content on the
# same page. Here with a link (should be replace) to Recman register page.
if ( have_posts() ) while ( have_posts() ) : the_post();?>
<section>
<div>
<?php the_content(); ?>
<a href='....' class='button'>Create a profile</a>
</div>
</section>
<?php endwhile; ?>
<section>
<?php
# The Re
# Check if Recman WP Plugin is installed and has rows of data
if( function_exists('have_jobposts') AND have_jobposts() ):
# Loop through the rows of data
while ( have_jobposts() ) : the_jobpost();
# A link wrapper of each post.
echo "<a href='".get_jobpost('permalink')."'>";
# Show logo
if( $logo = get_jobpost('logo') ) {
$alt = ( get_jobpost('name') ) ? get_jobpost('name') : '';
echo "<div><img src='{$logo}' alt='$alt' /></div>";
}
# Text wrapper
echo "<div>";
# Text header
echo "<header>";
echo "<h3>" . get_jobpost('name') . "</h3>";
echo "</header>";
# Show Excerpt
echo "<div class='jobtext'>";
echo "<p>" . get_jobpost('excerpt') . "</p>";
echo "</div>";
echo "<footer>";
echo "<ul>";
# Number of Positions
if( $pos = get_jobpost('numberOfPositions') ) {
echo "<li><i>Positions</i>{$pos}</li>";
}
# Show workplace
if( $place = get_jobpost('workplace') ) {
echo "<li><i>Place</i>{$place}</li>";
}
# Show type - Autotranslated
if( $type = get_jobpost('type') ) {
echo "<li><i>Type</i>{$type}</li>";
}
# Show deadlind
if( $deadline = get_jobpost('deadline') ) {
echo "<li><i>Deadline</i>{$deadline}</li>";
}
echo "</ul>";
echo "</footer>";
echo "</div>"; # end text wrapper
echo "</a>"; # end link wrapper
endwhile;
else :
# No job posts published. Show message.
echo '<h3>No available jobs at this point</h3>';
endif;
?>
</section>
</main>
<?php get_footer(); ?>Last updated