WordPress.org

Ready to get started?Download WordPress

Forums

having two blogs (pages with different set of posts each) (7 posts)

  1. metialb
    Member
    Posted 7 years ago #

    Hi there,

    the title says it all what i am looking for. Is it possible to have posts in two different pages ? Let's say in one page I want to display only a list of ARTICLES posts, while in the other page I want to display a list of BOOKS posts .... as far as my knowledge lets me go is .... just to add posts only to a single page.

    Another approach that I am thinking is to create at least two post categories: articles and books and I guess I could create some template to display only a certain set of the posts for a certain page.

    But I would be happy to know that there might be some other shorter/easier way around this.

    Thanks for reading

  2. Doodlebee
    Member
    Posted 7 years ago #

    I don't quite understand what you want...

    if you want to have an "Articles" section, then create that category. When you post stuff for articles, you select that category, Same with Books.

    Why do you need to display only a certain number of them? I don't understand what you're trying to do.

  3. metialb
    Member
    Posted 7 years ago #

    thanks for the quick reply,

    what i want is this:
    I have a main menu....let's say there are three main "buttons" (directing to other pages) under the main menu : 1. home 2. articles 3. books

    When I add posts, all the posts are added only to one page (let's say that I have set up the blog to be at the articles page )

    I also want to add posts to the books page. How do I do that

    Is that clear?

  4. alakhnor
    Member
    Posted 7 years ago #

    The shortest way is certainly to use categories.

    Have home.php with link to category 1 being 'books' and category 2 being 'articles'.

    Then you can create category-1.php and category-2.php which be used when you call either one of them. And you can have totally different templates for them (with a little coding though).

  5. Doodlebee
    Member
    Posted 7 years ago #

    When you add a post, yes, it'll be added to the index page. That's the default - your home page will display all of your most recent posts, in every category.

    However, if you've created a post and selected a category to place it in, then the post will not only be in your index page, but also in the category you placed it in.

    So if you wrote a post, and selected "Articles" for the category, the post will show up on the index page, AND the articles category. Eventually as you make new posts, the ones you see now will move off the main page, but they will *always* be in "articles".

  6. metialb
    Member
    Posted 7 years ago #

    Yeah alakhnor,

    That's what I was thinking too, I just thought to try and post here may be there is something shorter that I don't know about...I just started looking at wordpress a week ago (1 hr per day) so I don't know all the existing tricks. But that makes sense.
    Thanks to both of you.
    Thank you doodlebee too, for your clear explanation

    The shortest way is certainly to use categories.

    Have home.php with link to category 1 being 'books' and category 2 being 'articles'.

    Then you can create category-1.php and category-2.php which be used when you call either one of them. And you can have totally different templates for them (with a little coding though).

  7. Doodlebee
    Member
    Posted 7 years ago #

    Have home.php with link to category 1 being 'books' and category 2 being 'articles'.

    Then you can create category-1.php and category-2.php which be used when you call either one of them. And you can have totally different templates for them (with a little coding though).

    Using "category-1.php" and "category-2.php" are templates for two different categories, and are usually used when you want them to have different looks - those files simply create the layout for the pages.

    If you want them to *look* very different from each other, I would suggest doing that, but if you plan to use the same theme throughout, it's not necessary.

    If you want your index page to have one category or the other, you can simply use a query_post. For example:

    <?php query_posts('category_name=special_cat&showposts=10'); ?>

    ..place right before the "if have posts: while have posts" stuff in the index.php file will show the last 10 posts in the category named "special_cat" on the index page.

    If you want *both* to show up on the index page, and do their thing independently, you do the same type of thing with multiple loops.

    Is that what you're looking to do? because the original question seemed to be asking how to place things in certain categories *instead* of the index page - when WordPress does both by default.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags