Adding Posts to a separate page

  • lionelwoodl7


    Hi there,

    I’ve added about 8 posts to the ‘home’ page of this theme (with the slider). I was intending of adding another page with a completely new set of posts that only appear on this page (and not on the first) – Is this possible? If so how?

    Thanks for your time.


    Syahir Hakim


    Erm.. the easiest way I can think of is to set the front page to show posts only from a certain category, and then create a new template file that will show posts only from another certain category in the other page that you created.

    Something like this:

    1) Set “Front page posts categories” to the category of posts you want to show in the front page via WP Admin > Appearance > Graphene Options > Front Page Options.

    2) Create a new page that you want the second set of posts to be displayed. Let’s say you name it ‘Awesome’.

    3) Create a new file in your child theme’s directory and name it page-awesome.php. The naming is important here. You must name the file using the page’s slug (in this case ‘awesome’) and prefixed by page-.

    4) Insert this code inside the page-awesome.php file:

    global $graphene_settings;
    global $wp_query;
    $cat = 1; // This should be the ID of the category to display the posts from
    $args = wp_parse_args(array('cat' => $cat, 'paged' => get_query_var('paged')), $query_string);
    $wp_query->is_home = true;

    get_template_part('loop', 'index');

    get_footer(); ?>

    5) Assign the posts to be displayed in the second page the category that you have defined in the code above.



    Hey.. this is a great way to accomplish this task. I appreciate it. One issue, when I copied the above text into the page, it didn’t work correctly until I removed the } from on line 9. After that it worked great…

    Question.. anyway to add text to that same page? I am building a classroom website and want to have say parent announcements be like blog entries but I want a category page with general information above the posts. What you have above is perfect for what I need if I can still add text to the page, which didn’t seem to work when I try it.

    I want category pages so that I can have posts assigned to categories such as homework, parent announcements, etc but have them appear on pages with some basic text, for example all homework posts appearing on a page with homework guidelines, standards, etc.



    Syahir Hakim


    Edited the code to removed the extraneous }.

    The next update will enable you to enter a description for each category, and the theme will display it in the category archive page.



    Nice that would work. What is the timeframe for the update?


    Syahir Hakim


    Probably in about a month’s time, beta testing period included. But of course, if you’re feeling adventurous, you can try out the latest development version any time you want.



    I would be willing to try it out…could you send me a link to the download


    Syahir Hakim


    Hurm..on second thought you probably won’t want to use the latest build on a production site..quite a lot of experimental stuffs are going on as of now.

    However, you could try updating just the theme’s category.php and style.css files. You can get them here:

    If something goes horribly wrong, you can always revert back to the latest stable version, 1.3.1, which is available at themes repository.



    I want to have ~ 8 posts on the “home” page, but also want to have another page that is for Blogs.

    But I would like this page to be in the same format as the posts of the home page.

    I have tried to follow the info described above, but with no luck. Please help…



    I have a question with regards to the post above:

    3) Create a new file in your child theme’s directory and name it page-awesome.php. The naming is important here. You must name the file using the page’s slug (in this case ‘awesome’) and prefixed by page-.

    Q) Where is the Child theme directory? Are you saying to create a folder named ‘page-awesome.php’ ???

    Assuming our new page we created is called Awesome & this is the page that we want posts to be shown on.

    If you could shed some light on this for me, that would be greatly appreciated.

Viewing 10 posts - 1 through 10 (of 13 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.
Graphene Themes Forum