Support » How-To and Troubleshooting » displaying one category only, on specific pages

displaying one category only, on specific pages

  • hi all.

    i am in desperate need of some help.

    i used wordpress to create a small cms site for a client. all is well except for the fact that he wants to display different links in the sidebars depending on what page is shown.

    i am trying to use the is_page function to display a category. for some reason it is not recognising what page it is on thus the category does not get displayed.

    basically i am displaying a category on the PAGE in a small sidebar on the page like so

    <div id=”whitepapers”>

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post();?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>

    <?php the_content(‘Read the rest of this entry »’); ?>
    <?php endwhile; ?>
    <?php else : ?>
    <?php endif; ?>


    i now need to be able to detect what page it is, either by slug name or page id and then display a different category. for example, on the applications page i want to show a category in the sidebar that has links to different application data. then on the whitepapers page i want to show a category that has links to technical whitepapers etc.

    can anyone here help me out. i have been at this for hours, googled to death and am not finding anything that is working.

    Thank you


  • The topic ‘displaying one category only, on specific pages’ is closed to new replies.