saviornelas
Member
Posted 9 years ago #
I have the following category and subcategories
foobar id=1
--> foo id=2
--> bar id=3
Now what I want to do is make "index.php?cat=1" show something like this
--------------------------------
FOOBAR
>> FOO
Entries in subcategory FOO
>> BAR
Entries in subcategory BAR
--------------------------------
I have tried to use includes. The entries of FOO appear normally but in BAR the FOO entries appear again.
Any suggestion?
what exactly is the code that you use to display FOO normally and BAR+FOO mixed up?
We could start from there :)
saviornelas
Member
Posted 9 years ago #
For FOO
<?php
$cat='2';
require_once('./wp-blog-header.php');
?>
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
<?php the_content(); ?>
<?php endforeach; else: ?>
<?php _e("Error"); ?>
<?php endif; ?>
and for BAR I just change cat to '3'.