I didn’t find how to loop each category if there is such as thing, but I found this solution, its WORKS fine…
<?php if ( $topics ) : foreach ( $topics as $topic) : ?>
<?php
$doof = $topic->forum_id;
if ($doof=="1") {
?>
<p><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a><?php topic_page_links(); ?></p>
<?php } ?>
<?php endforeach; endif; ?>
Still a problem, becuase the above solution spits out all the topics and not only 3 as Required..
can anyone help, on how to do a FOR loop for this, i dont get how the array $topics works?
please help.
if you know how to do this please, show me, <?php topic_title(); ?> seems as though it can only be used in a that foreach loop, i cant do a for loop and add ing <?php topic_title(); ?> inside of it.
Although I havn’t tested it but it should work:
<ul>
<?php
$count=0;
if ( $topics )
{
foreach ( $topics as $topic)
{
$doof = $topic->forum_id;
if ($doof=="1")
{
if($count<3)
$count++;
else
break;
?> <li><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a> | <?php topic_page_links(); ?></li>
<?php } } } ?>
</ul>