• Resolved seerat

    (@seerat)


    hello

    im wondering if this is possible, im trying to use wordpress as a CMS

    basically my website has a horizontal navigation and i want the navigation to display category names so for example i will create categories called cars, phones, laptops, and then add each category as a navigation link

    i know this is possible because i have done it before

    anyway what i want to do is have pages within certain categories to show in the sidebar of that category as links to the page, isit possible to assign pages to categories and then call the pages linked to categories in the sidebar??

    hope that makes sense

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter seerat

    (@seerat)

    thanks for the help guys *sarcasm*

    i figured it out all by myself ??

    basically im just putting some conditions into the sidebar.php

    <h3>Pages</h3>

      <?php if (is_category(Home)) {
      wp_list_pages(‘include=2’);
      } else if (is_category(Events)) {
      wp_list_pages(‘include=7’);
      }
      ?>

    I’m not sure pages can usually be assigned to categories with the default install of WordPress (there might be a plugin or two) but glad you managed to figure it all out! Thanks for sharing your solution as well ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add pages in categories’ is closed to new replies.