WordPress.org

Ready to get started?Download WordPress

Forums

How to connect a category to a page? (13 posts)

  1. MuziekNu
    Member
    Posted 6 years ago #

    I'm looking for a plugin that connects (the posts of) a category to a page. By clicking this page only the posts of this specific category should be shown. I've found several plugins, but they all connect a page to a category.

    It would be also very nice when those posts of that specific category aren't shown on the home page (it's a nice to have).

  2. Ivovic
    Member
    Posted 6 years ago #

    People seem to keep asking this - what's wrong with the page you get when you click on the category link in the sidebar?

  3. Ivovic
    Member
    Posted 6 years ago #

    see this thread for preventing posts to a specific category from appearing on the main page.

  4. MuziekNu
    Member
    Posted 6 years ago #

    @Ivovic; Thanks for your reply, and I know you're -a little bit- right. However, we are making a category 'kerst'(Christmas), and it's a little bit early for that. So it shouldn't be published at this time. I think it's easier and also nicer to do this with a page (with an own css) instead of a category. Or is it possible to (un)publish a category temporary, how?

  5. moshu
    Member
    Posted 6 years ago #

    Don't ever mix Pages and posts. Instead of complicating your life - use WP's features to get the best out of it.

    No, you cannot delay a whole category, but you can set the time stamp of the posts in it to a future date.

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    I think it's easier and also nicer to do this with a page (with an own css) instead of a category.

    Why? Why in the world would anybody think that when there are such perfectly simple and servicable things like Category Templates?

    We have different things in WordPress specifically designed to do different things. Sure, you can abuse the hell out of the system and do something all wrong, but why on earth would you ever want to?

    I seriously don't get it. Every week somebody asks how to make a Page that lists a single category, or how to make a page that lists a bunch of Posts, or some other complete abuse of all the mechanisms built in. WHY? Why does everybody have this insane need to use Pages for everything? They only make things 10 times more difficult in the long run. Pages should be *rarely* used! That's their whole point!

    Argh!

  7. MuziekNu
    Member
    Posted 6 years ago #

    Apparently I've asked something very stupid, like so many other WP users (!). I prefer your ideas and suggestions -about a wanted functionality- above all those not very sympathetic words. Perhaps it isn't clear enough, 'pages' and 'categories' and how to use them.
    But let's not argue. I'll study the given links and also "set the time stamp of the posts in it to a future date" suggestion. I'm using WP about a month right now, and I (a former joomla/mambo user) like it very much.

  8. moshu
    Member
    Posted 6 years ago #

    It is relatively simple:
    Pages (click on it if you didn't till now!) are meant to display quasi-static content like About us, Contact - and Pages are not part of the chronological stream of the posts.

    Also, Pages are not built to display the so-called "multi-post" views (like the monthly or catgeory archives/listings).

    On the other hand the Category_Templates are as flexible as (you think) the Pages are. You can style them in zillion ways.

    I guess Otto gets as frustrated and angry as I often do when we see people who want to force WP to do 'abnormal' things... instead of taking advantage of all the built-in features.

  9. MuziekNu
    Member
    Posted 6 years ago #

    You shouldn't get frustrated or angry, especially not when so many are asking the same question. It isn't that simple you know, and our knowledge levels aren't the same. As I've said, I'm studying the given links, and I think I'm getting somewhere. So thanks for your suggestions. @Otto, no hard feelings :-).

  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    It's okay, I'm calmer now. Coffee helps. ;-)

  11. MuziekNu
    Member
    Posted 6 years ago #

    I'm using the Page Template, on the top this code:
    <?php
    /*
    Template Name: arc-cont.php
    */
    ?>
    <?php query_posts("cat=203"); ?>
    <?php get_header(); ?>
    etc.

    And indeed, only category 203 is showing, but at the end appears this error:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
    SELECT COUNT(DISTINCT ID) FROM

    If I click the same category, everything goes fine. What is going wrong?

  12. MuziekNu
    Member
    Posted 6 years ago #

    This code is giving the problem

    <?php wp_pagebar(array 'before'=>'Page: ', 'after'=>' ', 'tooltip'=>true, 'tooltip_text'=>'Page'))?>

    I don't know why. I've replaced it with a more, and lesser nice, standard code:

    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div>
    </div>

    See also topic: http://wordpress.org/support/topic/73027

  13. kidino
    Member
    Posted 6 years ago #

    Hmm... Why? Well, maybe I can help with that question. I am not exactly looking for a page to category solution, but something like that may help with my problem.

    I think this situation is for people who are NOT USING WORDPRESS AS A BLOG. I love WordPress that I make it into an article directory (submitted posts becomes articles) and web template download gallery site (each posts contains info, thumbnail, download links for a template).

    Alright, there's no problem with the non-blog solution that I have. They work great. But at the same time, I'd like to run a blog that shares progress and updates of the site. Because the categories are being used to manage non-blog content, I was wondering if I can create a top "blog" category and run my blog there.

    Now, with that, comes the problem of navigation. How do you separate your non-blog content with your blog content? Hence the page to category comes to mind.

    I am still looking at other solutions like multiple blog installation, category exclusion, etc... at this point, still testing and have yet to choose one.

Topic Closed

This topic has been closed to new replies.

About this Topic