mercredi 29 avril 2015

Two Wordpress search results pages

I would like to have two different search results depending on the page, that the user is on.

I have duplicated how the previous search contents would display, added the extra code that I want the staff search to show, and then put an if statement around it.

If user is on page 'staff' - then show this Else show this.

I cant seem to get the if-statement to work, any help would be appreciated.

<?php if (is_page('staff')) { ?>

<article class="entry post clearfix">
    <-- Title / Thumbnail / Price / Description coding -->
</article> 

 <?php } else { ?>  

<article class="entry post clearfix">
    <-- Title / Thumbnail / Description coding -->
</article> 

<?php } endif; ?>

Any help on this would be great.

Aucun commentaire:

Enregistrer un commentaire