Is there a way to get the number of posts on a page?
I've got an ad after the first post and one after the last, but when there's only 1 post on the page we get 2 ads after one another
e.g. *HOW TO CORRECTLY ASK A PILL I.D. QUESTION* - Drugs.com
This is a discussion on Finding number of posts on page (in templates) within the Template Modifications forums, part of the vBulletin SEO Discussion category; Is there a way to get the number of posts on a page? I've got an ad after the first ...
Is there a way to get the number of posts on a page?
I've got an ad after the first post and one after the last, but when there's only 1 post on the page we get 2 ads after one another
e.g. *HOW TO CORRECTLY ASK A PILL I.D. QUESTION* - Drugs.com
The code will look like:
HTML Code:<if is_first_post_condition> first ad code <else /> <if is_last_post_condition> second ad code </if> </if>
Oleg Ignatiuk / Crawlability Inc.
vBSEO 3.6.0 GOLD Released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
Thanks, I couldn't get the is_last_post_condition working for some reason, but this worked for me:
Code:<if condition="$post[postcount]==1 AND !$post['islastshown']">
Yes, "is_last_post_condition" is just a placeholder for the real condition statementThe point was to insert last post ad only if it is not the first post at the same time.
Oleg Ignatiuk / Crawlability Inc.
vBSEO 3.6.0 GOLD Released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!