• Resolved michelle49

    (@michelle49)


    In my blog I have created a page called “Events”, and I would like for users to be able to click on the “Events” page and see all the posts I have posted in the “Events” category. Is this possible?

Viewing 7 replies - 1 through 7 (of 7 total)
  • See if this post about Pages and Categories helps you to think about a different approach…

    Thread Starter michelle49

    (@michelle49)

    So theoretically I should be able to change the code that displays the static pages to link to the category instead?

    That’s my point, exactly. For me it is much simpler to alter one line of code than to force WP to do something in an unnatural way.

    Thread Starter michelle49

    (@michelle49)

    Hopefully I can figure this out, I’m pretty new with code. Thanks so much for your help!

    Just open your sidebar.php template file (usually, that one is containing the code for your sidebar) and edit the wp_list_pages part as shown in the tutorial above.

    This is exactly what I was looking to find out…but it still does not solve my problem… of wishing to mix pages and categories in the side bar.

    Page
    -sub Page
    -sub Page
    -category
    -category
    Page
    -sub Page
    -sub Page
    -category
    -category

    Is the only way to do that to make a custome coded nav?

    This is exactly what I have been working on with one of my pages. I use event calendar and it shows links to the events in the widget, but:

    1. I want to have a page that is a child page that will show up in the navigation that lists all the events. I just want to have my navigation code display my main pages,
    and then display a secondary nav bar of the child pages.

    2. I use my home (blog) page to display current news and happenings in our organization and use a category that I display inline for a separate blog page.

    2. I have my install set to show 2 posts to control page length and then users can click keep looking to continue.

    3. I tried a mod of inline-posts that allows inline display of categories. That works pretty slick but for some reason it limits the posts to 5 on a page and I have not corrected that yet.

    4. I settled on a plugin that is similar and seems to work quite well. The issue is that it inserts a list in such a way that the options settings do not limit the number of posts to match the rest of the pages. But for now, it the best I have come up with and it would be perfect if it responded to the limit of posts displayed on a page.

    5. Before I used this code:

    <?php
       if (is_page(50)) {
          query_posts("cat=12");
       }?>
       	<?php
       if (is_page(74)) {
          query_posts("cat=3");
       }?>

    and it worked wonderfully allowing me to hack the page.php template and it worked for as many pages as I wanted to insert code for and listed everything naturally in the nav bar by parent and child, but it broke around 2.3 and would not allow the posts to advance when clicking ‘keep looking’ to get the next page of posts. I wish someone had a fix for this as it required no plugins.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to Display Posts of a Certain Category on a Specified Page?’ is closed to new replies.