WordPress.org

Ready to get started?Download WordPress

Forums

Displaying a list of posts at the same time as a single post (is_single). (3 posts)

  1. Magnus_Andersson
    Member
    Posted 8 years ago #

    Hi, I have a slight problem. I'm using wordpress as a backendsystem for a project I'm currently developing. In hindsight I should perhaps have investigated the wordpress behavior a little more closely before I did this. But that is too late now.

    It's a normal homepage with menu, submenu and a place where the page(post) is displayed. I'm working with a lot of text and need a searchable database, so that is why I'm using wordpress instead of developing my own CMS from the beginning.

    I've structured the homepage so that the catogeries are the main menu. Then the titles of each invidual post in that catogery form a submenu. And the whole post is the main content representing one page. I use a fixed set of posts in each catogery (or main menu item) so the posts are not supposed to increase over time. I just want to use wordpress to edit them.

    My problem is this: I can't display a single post at the same time as I am listing all the posts in a catogery. This is in the same php-file. I'm using The Loop right now for this. When I chose a catogery it lists all the posts in the submenu fine (using the archive behavior). But when I click a single post in the submenu, the post is displayed with the single post behavior so the submenu only lists that single post.

    What I would need is a suggestion on how to list posts in a certain catogery the same way as the wp_list_cats function list catogeries outside the loop? Is there an easy way to solve this instead of writing my own function?

    I've been trying to wade through all the wordpress-files, I'm understanding more and more, but it is a slow progress. Is there any documentation on this? I tried the codex but could just find template functions. But those don't help me much. I want the under-the-hood functions described as well. Does the developers all just know how everything works, since they've been doing this from the start, or do they have any kind of listing/documentation over all the functions?

    Thanks for any help, sorry if the text was a bit long.
    /Magnus

  2. moshu
    Member
    Posted 8 years ago #

  3. Magnus_Andersson
    Member
    Posted 8 years ago #

    Thanks Moshu! I'll start looking there.

    In the mean time, if anybody else have a good suggestion to my problem I'd be happy to hear them as well!

Topic Closed

This topic has been closed to new replies.

About this Topic