hi, normally i use this code to show the category description only on the first page:
<?php if (!is_paged()) {?>
<div class=”category-term-description”><?php echo category_description( $category_id ); ?></div>
<?php }?>
but in enfold i get this debug message
Notice: Undefined variable: category_id in /var/www/……………./archive.php on line 33
is it possible to modify your standard code in the archive.php
<?php
$tds = term_description();
if($tds)
{
echo “<div class=’category-term-description’>{$tds}</div>”;
}
?>
that shows the category description only on the first page?
thank you
Hey siteraum,
Do you still need help with this issue? I don’t see the category description on the second page.
If you need further assistance please let us know.
Best regards,
Victoria
Hi Victoria,
you cant see the description on the page becauce i use this
<?php if (!is_paged()) {?>
<div class=”category-term-description”><?php echo category_description( $category_id ); ?></div>
<?php }?>
but know i change it back to the standard enfold code in the archive.php.
Can you please look again, and how can i disable the description on the second page of the categorie (without using display:none; !)
thank you victoria
Hi,
Try to add this code before the if is_paged
$categories = get_the_category(); $category_id = $categories[0]->cat_ID;
Best regards,
John Torvik
hi john,
thank´s a lot- now no debug message!. it works perfect.
thank you
john
Hi!
Happy we can help.
Please feel free to let us know if there is anything else we can do to help you out.
Thank you
Cheers!
Basilis