Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author agentevolution

    (@agentevolution)

    Yes. It’s possible. You’d need to modify the archive_listing_loop() function inside archive-listing.php to include the if statement. It’s already there for non-Genesis themes and will display the theme’s content-none.php template if it exists.

    Thread Starter sp_sam

    (@sp_sam)

    Thanks. I had previously tried that with no luck. Would you mind taking a look at the following and tell me where I’ve gone wrong?:

    <?
    function archive_listing_loop() {
    
    		global $post;
    
    		$count = 0; // start counter at 0
    
    		// Start the Loop.
    		if ( have_posts() ) :
    		while ( have_posts() ) : the_post();
    
    			$count++; // add 1 to counter on each loop
    			$first = ($count == 1) ? 'first' : ''; // if counter is 1 add class of first
    
    			...PURPOSELY REMOVING ALL OF $LOOP STUFF FOR THIS FORUM POST TO SAVE SPACE}...
    
    		   endwhile; else: ?>
    			<p>Sorry. No properties were found matching your search criteria.</p>
    		 <?php endif; ?>

    Plugin Author agentevolution

    (@agentevolution)

    Other than the missing closing bracket on your function, that should work. Is this a Genesis theme?

    Thread Starter sp_sam

    (@sp_sam)

    This is not a Genesis theme. It’s a custom theme we built for a client. The URL is not for public consumption right now, but I could email it to you privately if that would help. Just let me know where.

    Plugin Author agentevolution

    (@agentevolution)

    Then all you need to do is place a content-none.php file in your theme folder and that will be used if no results are found.

    Thread Starter sp_sam

    (@sp_sam)

    Resolved. Thank you very much.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Display message if no search results returned’ is closed to new replies.