i need some help and probably its not hard for a good php programmer.
The code is below and i need for every category the right job to be filtered in.
The result should be:
category 1
job1 of category1
job2 of category1
job2 of category1
category 2
job1 of category2
job2 of category2
job2 of category2
and so on.....
i hope somebody can help me. sry for my bad english but iam not a native speaker.
<?php $job_categories = wpjb_form_get_categories();
foreach ($job_categories as $cat) : ?>
<?php $param["category"] = $cat["id"] ?>
<h2><?php echo $cat["description"] ?></h2>
<div class="wpjb-job-list">
<?php $result = wpjb_find_jobs($param) ?>
<?php if ($result->count) : foreach($result->job as $job): ?>
<?php /* @var $job Wpjb_Model_Job */ ?>
<?php $this->job = $job; ?>
<?php $this->render("index-item.php") ?>
<?php endforeach; else :?>
<div class="wpjb-grid-row">
<?php _e("No job listings found.", "wpjobboard"); ?>
</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire