Support » Fixing WordPress » categories and pages

  • Rick

    (@figurehead)



    Hi all, I’d really hate myself if this issue had already been solved somewhere else but, i promise i read all the related threads but couldn’t find a solution. Maybe because I’m total newbie of wordpress and i find some posts hard to understand.

    What I want to do is to create pages that only show a category.

    I have a music blog and let’s imagine i have 3 categories: review, gigs, artists

    All “review” posts go in the main page and this is pretty straightforward. What i want now is that, everytime i write an article in the categories “gigs” or “artists” it is visible only in the correct page.

    Is that possible? Or maybe is there a better/easier way to do that?

    I just imported all of my content from blogger and need to get used to this new syste,
    thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Your problem has two parts. The first part is to exclude certain categories from the Home page. That can be handled by a plugin such as Simply Exclude.

    The second part, create pages for a single category, can be handled several ways. I have used the Page Links To plugin. There may be better solutions depending on your theme and skill set.

    Rick

    (@figurehead)

    thanks vtxyzzy!

    I’ve had some troubles with the plugin at the beginning but now i managed to connect pages and categories.

    thanks!!!

    Rick

    (@figurehead)

    I’ve spoken too quickly.

    now the browser goes “The page cannot be found” when i try to access a page…not only if the page is connected to a cat but also with all other pages…

    Disable the plugin and see if the problem goes away.

    Rick

    (@figurehead)

    I disabled it.
    Now not only I don’t have a connection between categories and pages but my original pages are not accessible anymore.

    Any idea of why this is happening? I’ve also deleted the plugin but nothing seems to improve…

    Sorry, I don’t know what could be causing that.

    Rick

    (@figurehead)

    Ok I’ve been doing some more research and it seems like I found a valid solution for this.

    As explained here I’ve put the following code in a page template:

    <?php
    query_posts(‘cat=9’);
    while (have_posts()) : the_title(); the_post();
    the_content();
    endwhile;
    ?>

    It works very nicely, exactly as I wanted, showing the full post and so on…the only problem is that it doesn’t show the first bit of a post (title, posted by and all the social network paraphernalia I have).

    Any idea?? thanks!

    Rick

    (@figurehead)

    I forgot to mention that you can see the result of this experiment here:

    http://www.figurehead.it/index.php/english-test/

    it doesn’t show the first bit of a post (title, posted by and all the social network paraphernalia I have

    there is no code for this in your snippet.
    the_content(); only shows the content of the post –

    for inspiration look into single.php of your theme.

    Rick

    (@figurehead)

    thanks alchymyth. I’ve had a look at that file and I almost understood how it works. But I know nothing about php and I don’t understand how to integrate the content of single.php with the loop in my page code.
    Can you help or my request is too generic?

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