Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   [SOLVED] Display 'Post Count' on all MULTI post pages (http://forum.bytesforall.com/showthread.php?t=4399)

joan Nov 12, 2009 08:07 AM

[SOLVED] Display 'Post Count' on all MULTI post pages
 
Hi wonderful people,
Hopefully this is easy & helpful to other. Above the loop of every single category, tag and search results page, I'd like to show

"XX tours found"

which is the result of the code:

echo $wp_query->post_count . ' tours found';

I have put this into one category template (eg category-385.php) on http://travelhorizonstyle.com.au/cat...country/india/ and it works for this category (10 tours found), but to see it on ALL cats/tags/etc, I tried putting the code in Ata3.4.4 Centre Column, Content ABOVE the LOOP, and it does not display the result of $wp_query->post_count. (eg on http://travelhorizonstyle.com.au/cat...ountry/africa/)

Any suggestions would be greatly appreciated.
Kind regards,
Joan

joan Nov 18, 2009 03:08 AM

Well chaps I thought this would be simple to solve. Not sure why it's not working from the Ata admin screen, but when I edit the index.php file and add:
<?php if ( !is_single() ) { echo $wp_query->post_count . ' tours found'; } ?>
it works fine, so this thread is solved.


All times are GMT -6. The time now is 03:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.