• alex84636

    (@alex84636)


    I am customising search page results for staff and customers.

    I have created a private page, password protected, hidden to the public, and I want more information to display when staff use the search in this page.

    If the public are using the search, on the non private page, I want to show less information.

    My thoughts where if the page or page template is ‘stock-managers’, then display this, else then display that.

    I have tried various approaches, and cant seem to get anything to work. Any help would be really appreciated.

    <?php if (is_page('stock-managers')) { ?>
    
    	<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; ?>
Viewing 1 replies (of 1 total)
  • Richard

    (@richardcoffee)

    You would probably be better off using a different method, such as is_user_logged_in(), or something along those lines. If you are going to serve content based upon who the user is, then you should be looking at that, rather then what page they are on.

Viewing 1 replies (of 1 total)
  • The topic ‘Display specific search results depending on the wp page being used.’ is closed to new replies.