• Resolved yachtchefjobs

    (@yachtchefjobs)


    my site is http://www.yachtchefjobs.com/

    I want to create a page of posts which lists the posts for a post category id=2 in archive form in date order with most recent post for id2 at top and going down page with oldest last.. maybe 25 posts per page

    i took the page.php template and copied it and renamed it jobs page template and i can select this when i create new page as a template but i dont know how to get it to list the post for that id as an archive listing in the order i want. the theme design seems to go when i try.

    any help is appriacted!

Viewing 15 replies - 1 through 15 (of 15 total)
  • Unfortunately, you’re on the wrong path entirely. What you’re doing is for static pages, not your blog posts. Instead, what you would do is create a file called category-{id}.php, where {id} is the category ID (2, in your case). WordPress will load that file to display an archive of posts from that category.

    Thread Starter yachtchefjobs

    (@yachtchefjobs)

    hi stephencotontail… thanks..
    what code goes in file.. you havent said..
    jsut a blank php ?
    thanks
    Efrem

    Does your theme include a category.php or archive.php? If so, you could just make it a copy of that file, rename it to category-2.php, and then edit the new file to make whatever changes you need to make.

    Thread Starter yachtchefjobs

    (@yachtchefjobs)

    its got an archive.php and category template
    which is better?

    Use archive.php.

    Thread Starter yachtchefjobs

    (@yachtchefjobs)

    thanks.. will give it go

    Thread Starter yachtchefjobs

    (@yachtchefjobs)

    strang there was a file already called category-2.php dated last night when i installed the theme

    You should be good to go, then. WordPress will use that file to display an archive of posts that belong to the category with the ID number 2.

    Thread Starter yachtchefjobs

    (@yachtchefjobs)

    excuse me for being a numpty but how do i now create the page..
    eg do i click new page.. called it ‘jobs’.. then how do i make it pick up the posts for id 2 in the page content area.. do i insert short code into the page itself or what do I do?
    thanks..
    Am a novice..

    Can you clarify what you’re trying to accomplish? I noticed that on your site, you have a link to your blog, but the blog itself doesn’t exist yet. When you write a blog post, you have the option of assigning a category (and tags) to that post. With most themes, you can click on the name of a category and WordPress automatically knows how to group all posts belonging to the same category and display them on one page.

    Thread Starter yachtchefjobs

    (@yachtchefjobs)

    ok, ignore the blog button.. that is another seprate site.. under construction.
    what i want to do as add each new individual job i get in as a post so that the various jobs on http://www.yachtchefjobs.com/yacht-chef-jobs/ are separate posts…
    so i will end up with say 100 psots for 100 inividual jobs after 1 month.
    then for people to seahc jobs and see the arhive i wanted to have the link that is called jobs at the top of the site on th right and the view all jobs link take them to an archive page with the jobs listed either by month or say 30-40 per page…
    the listing will use the post title and the visitor can click the title to then view the psot/job..
    hope this makes sense..
    am just trying to load jobs onto the site and as each post is added the wp to twitter then tweets it as a new job.. like an auto job alert to my twitter followers

    Thread Starter yachtchefjobs

    (@yachtchefjobs)

    if i view the last 2 posts i have made the format is all wrong.. weird..
    see http://www.yachtchefjobs.com/sea-sens-restaurant-reopens-in-cannes/?preview=true&preview_id=358&preview_nonce=0c0d411223

    and

    http://www.yachtchefjobs.com/sole-chef-36m-motoryacht-cote-dazur/

    then look at http://www.yachtchefjobs.com/yacht-chef-jobs/ which is in right format…

    not sure hat is going wrong with layout of the 2 new posts above.

    Unfortunately, as I do not have access to your theme, you need to seek further advice from Barn2 Media. They should be able to help you with your layout issues.

    Thread Starter yachtchefjobs

    (@yachtchefjobs)

    ok thanks.. appreciate your time and help

    Thread Starter yachtchefjobs

    (@yachtchefjobs)

    this is now closed

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘creating an archive page of posts for a specific category id?’ is closed to new replies.