Support » Fixing WordPress » Link Categories to Pages?

  • FangedFreak

    (@fangedfreak)


    So i’ve just created a website using WP, and i’ve made a few categories and then pages with the same category names

    I write a new post and put it into a category (i.e. Music) and then when i click on my Music Page, its blank

    How can i change it so that when i click on my Music page, the post will be there? Please explain in as detailed way possible haha

    Thanks!!

Viewing 15 replies - 1 through 15 (of 24 total)
  • Moderator Kathryn

    (@zoonini)

    I write a new post and put it into a category (i.e. Music) and then when i click on my Music Page, its blank

    That shouldn’t happen. When you click the category you should see all posts in that category.

    Try first switching to the Twenty Ten theme and try again to rule out a problem with your theme files.

    esmi

    (@esmi)

    Forum Moderator

    I’d also suggest that you avoid giving Pages, Tags and Categories the same names.

    FangedFreak

    (@fangedfreak)

    I’m using the Twenty Ten theme.

    If i click on the music page, the url is example.com/music

    but the post i made in music is example.com/category/music

    thnx

    esmi

    (@esmi)

    Forum Moderator

    Posts are listed in Categories – not Pages – by default.

    FangedFreak

    (@fangedfreak)

    So how do i make it so a list of the music posts will appear on a Music page?

    esmi

    (@esmi)

    Forum Moderator

    WordPress does this automatically, Try clicking on the category link in any one of your existing posts.

    Moderator Kathryn

    (@zoonini)

    You mean that you want a page with some information at the top and then below that a list of your music posts?

    As esmi says, posts are listed on the dynamically generated cateorry page by default – not a WordPress Page you created. (Sorry, I read your initial post too quickly.)

    One easy workaround is to use the category description field to add the info you want to appear above the list of posts. Then add a line to your category.php to display the category description.

    <?php echo category_description(); ?>

    Don’t edit the default Twenty Ten theme, though, or your changes will be overwritten when there’s an update – create a child theme instead.

    FangedFreak

    (@fangedfreak)

    Ok so how can i get that link to show as a Category at the top of my website?

    Ganners

    (@ganners)

    It sounds to me like maybe you want your categories to appear in your horizontal navigation bar. In which case I suggest you take a look at opening up your header.php where this is found and swapping wp_list_pages for wp_list_categories?

    esmi

    (@esmi)

    Forum Moderator

    @ganners: That’s bad advice. You shouldn’t edit Twenty Ten!

    @fangedfreak: Navigate to Appearance->Widgets and drop the Category widget into the primary sidebar.

    FangedFreak

    (@fangedfreak)

    @ganners Yeh i want my categories in the horizontal navigation bar

    @esmi thanks but like i said above.. want them in the navigation bar

    @zoonini thanks for the link

    Ganners

    (@ganners)

    Yeah sorry, that is true, If I am correct in suggesting you want the categories to appear in the horizontal bar then I suggest duplicating twenty ten, renaming the folder and rename the theme in styles.css.

    Moderator Kathryn

    (@zoonini)

    You can also go into Appearance > Menus – and set your desired categories to appear in the navbar there. No theme editing required.

    FangedFreak

    (@fangedfreak)

    @zoonini

    Thanks for the tip about menus, i’ve put my categories in a new Menu but i dont see how i can make it work?

    Sorry… dont have any experience of using WP from scratch

    Moderator Kathryn

    (@zoonini)

    I don’t have Twenty Ten installed anywhere myself, but I assumed it came with a default menu? You’ll need to edit the existing menu, not create a new one.

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Link Categories to Pages?’ is closed to new replies.