• Resolved Termato

    (@termato)


    I am using:
    Theme Name: Twenty Eleven
    Theme URI: http://wordpress.org/extend/themes/twentyeleven

    for my Website Journal: http://www.termato.net

    When i log into my admin panel I go to Appearance > Editor.

    I cannot find a file that is named pageofposts.php

    I am following these directions: A Page of Posts

    I can only find these relevant ones:
    Page Template
    (page.php)
    Single Post
    (single.php)

    How am I supposed to create this page?

    Or am I supposed to create this file? If so in which folder in the directory? wp-content? Inside the template?

    I am new to WordPress. Thank you in advanced.

Viewing 11 replies - 1 through 11 (of 11 total)
  • To follow this specific example, you would create pageofposts.php inside the template folder. Since you’re now making changes to the theme, you should create a child theme of twentyeleven first:

    http://codex.wordpress.org/Child_Themes/

    To just get a page containing all posts, you don’t need to do anything that complicated. Your front page already displays your latest posts. You can instead have it display any Page as a front page, and choose another page for the Page of Posts. To do that (from the Dashboard):

    1. Go to Pages->Add New, and create a new empty page. I often call it Blog or News. This will be the “Page of Posts”
    2. Repeat 1 to create your front page, if needed.
    3. Click General->Settings.

    You’ll see the option “Front page displays:”. Select “A static page (select below)”. Then set the Front page to your front page (step 2), and your Posts page to the page you created in step 1.

    Hope that helps!

    Thread Starter Termato

    (@termato)

    Thank you for the help.

    I have created a child theme as directed.

    I want my home page to display ALL new posts stickied to the home page.

    I have the following Categories: Aquariums, Mice, Art and Snake.
    These are also pages.

    I want the Aquarium page to show all posts under the category aquarium and so forth.

    I will try what you have said and see if it works this way.

    Thread Starter Termato

    (@termato)

    I am having problem with this step:

    Go to Dashboard › Themes and activate your new theme, the Twenty Eleven Child.

    I have created the folder in the directory where the style.css file is.

    When I go to themes I do not see where I can activate the new child theme.

    Thread Starter Termato

    (@termato)

    Current Theme: Twentyeleven Child

    I was able to activate the new Child Theme.

    I also got the page of posts to work here: http://www.termato.net/aquariums/20g-community/ for two categories.

    Is these a way I can also put content on this page. When I go into the editor on the admin side and to Edit Page, the content in the content box is not on the page.

    I am guessing I will need to take the variable for this content and put it on the template for the pageofposts?

    assuming that your pageofposts has a custom query somewhere, add a simple loop before the custom query;
    http://codex.wordpress.org/The_Loop

    example:

    <?php while( have_posts() ) : the_post(); ?>
    <div class="page-content">
    <?php the_content(); ?>
    </div>
    <?php endwhile; ?>

    that should output the actual content as added into the page editor.

    details depend on the existing code of your pageofposts template;
    you can paste the full code into a pastebin.com and post the link to it here if you would like someone to have a look at it – HOWTO

    Thread Starter Termato

    (@termato)

    Thank you for the quick response alchymyth.

    I literally copied this code:

    http://codex.wordpress.org/Pages#A_Page_of_Posts

    I added the concluding ?> that is missing and changed the category names.

    Thread Starter Termato

    (@termato)

    Edit.

    try to add my suggested code just before those lines:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'category_name' => 'antiquarianism, championship', // Change these category SLUGS to suit your use.
    	'paged' => $paged
    );
    query_posts($args);
    Thread Starter Termato

    (@termato)

    Thank you so much.

    That really helped and it worked well. See here

    The only thing I do not understand about this code is why it is in a while loop?

    <?php while( have_posts() ) : the_post(); ?>
    <div class="page-content">
    <?php the_content(); ?>
    </div>
    <?php endwhile; ?>

    I can see it is calling “the_content();” function but why is it in a loop?

    That will only show the content if there are posts present. If I want the content to show regardless I would exclude that code.

    Thread Starter Termato

    (@termato)

    Thank you.

    I personally do use the default syntax for a loop, even if it is only one post/page;

    however, being just one post/page, you possibly could get away with:

    <?php the_post(); ?>
    <div class="page-content">
    <?php the_content(); ?>
    </div>

    try it 😉

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Theme Name: Twenty Eleven – pageofposts.php Not Found’ is closed to new replies.