> For the complete documentation index, see [llms.txt](https://bonsy.gitbook.io/bonsay-recman-wp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bonsy.gitbook.io/bonsay-recman-wp/wp-templates/job-posts-template-listing.md).

# Job Post Feed Template

## Wordpress template

You can use this template to kickstart the creation of the job posts listing page in Wordpress.

Please feel free to contact Bonsy to get a copy of this file!

```php
<?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(); ?>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://bonsy.gitbook.io/bonsay-recman-wp/wp-templates/job-posts-template-listing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
