• *Question 1 : Does any one know how to make a page displaying all the current users of my blog?

    *Question 2 : I want to set it up so my mian page displays my blog entries, but I have another “page” set up under the pages box in my side bar called interesting news articles where its kind of like another blog where I post about new news stories. I can go as far as creating a new news page, but dont know how to set up the secondary bloglike template in that new page. Any help?

Viewing 12 replies - 1 through 12 (of 12 total)
  • #1: Current users, as in who’s reading right now?

    #2: the Page Templates documentation might help you.

    Q1: Yes.

    http://wordpress.org/support/topic/34752#post-223767

    Q2. The problem is you could go a number of ways with this. Easiest would be to just create a Page as normal and edit it with each new news “entry.” Another more complex way would be to create a normal posting category for your news, exclude this from your blog’s home page, then either provide a redirect of a news Page to the category query with a plugin:

    http://asymptomatic.net/wp/2005/03/22/1413/redirectify-plugin/

    or set up a custom Page template that queries the posts from that category using query_posts(). Theres no doubt other ways to go about this, as well.

    Thread Starter diego898

    (@diego898)

    Q1 : No I mean all the registered users of my blog

    Q2 : Is there a page template that follows the blog guidlines? IE the tempalte of the main page? I want to create another blog for my interesting news article page!

    Thread Starter diego898

    (@diego898)

    Anyone?

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Your intentions are not clear.
    As far as I can deduce it, the separate category would be an obvious choice. But if you do want to have in in a page you can do it. Just copy your index.php and rename it to whatever and paste the code:

    <?php
    /*
    Template Name: Whatever
    */
    ?>

    according to Codex.

    Now, create your Interesting News page and choose “whatever” as your template.
    It will looks like your main page.
    Next, create a new category e.g. “News” and note the id. Copy the following just under the previous code:

    <?php>
    query_posts('2');
    ?>

    I use number 2 as an example!

    You should write the news entries like regular post but they will show up in your “Interesting News” page like standard posts.

    To exclude this category from regular posts just past the above code again, now in your index.php:

    <?php>
    query_posts(‘-2’);
    ?>`

    Note the “-” sign!

    This is all according to macmanx and Codex.

    I tried it right now and it just seems to work.
    Please correct if there is any mistake 🙂

    Edit to above post.
    Statements correctly:

    <?php>
    query_posts('cat=2');
    ?>

    and

    <?php>
    query_posts('cat=-2');
    ?>

    Kassad’s approach works beautifully. How would I modify the code to exclude multiple categories from the index.php page?

    Re Q1: Author_Templates and this thread have good info: http://wordpress.org/support/topic/47224

    For excluding multiple categories see an example at:
    The_Loop#Exclude_Posts_From_Some_Category

    [Edit: Kaf’s answer for Question 2 above is excellent!]

    I tried what Kassaf suggested, but the query_posts function seems to overwrite every page. For example, if I go to /page/2, I still see the most recent posts. Any ideas?

    /page/2 seems to be a “paged” index, isn’t it? And Kassad posted a solution for Page.
    In WordPress pages and Pages are not the same 🙂

    Oops.

    Thanks for keeping me on track, moshu. 🙂

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Just a couple questions’ is closed to new replies.