• Resolved Shadowz

    (@shadowz)


    I’m using the twenty Ten Theme, and wanted to have a page of posts. However that can be filtered by category, as well as the ability to see a certain number “Example 3” posts as a full or excerpt then the rest just titles. I have already tried to create that by using the page of post template and a few other pieces of code that i found, not much of a coder so i don’t know if its correct or any mistakes.

    The Problem with it, is that it doesn’t show a post like a normal post would in a blog page, instead it makes the title appear different using its own style in the template, but i want it to use the tags already created for post or “content” tags in style.css, as well as when i use the more feature in a post its doesn’t shorten the post, it just shows it full length.

    Here is a link to the template Page of posts template i made

    So basically i want it to
    1. Be filtered by categories

    2. Use the title tags in style.css, instead of using its own in the template

    3. Show a certain number of posts “like 3 and can change the number” then show the rest as titles one after another, and have some thing like a “>” in front of it. Sorta like a featured posts.

    4. Ability to show a post with the more feature

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Shadowz

    (@shadowz)

    Can anyone help, any information would be grateful!

    Okay, there’s a lot of questions in there. I’ll try to answer some of them.

    First off, try to post your code in pastebin.com directly in the post here. You never know what could be in a file.

    2) Delete your inline styling for the title tags. You can use the dynamic body classes instead. http://codex.wordpress.org/Function_Reference/body_class.

    Look at the source when that template is used and you can see all the body classes available- page-template-(template file name) is what you’d need.

    3) You’d need a conditional:

    if ($count <= 3) {
     the_title;
     the_content;
    } else {
      the_title;
    }

    4) Maybe this would help: http://codex.wordpress.org/Customizing_the_Read_More

    Thread Starter Shadowz

    (@shadowz)

    Thanks Devin, yeah i didn’t think about that, sorry though i didnt know about pastebin.com so thanks and here is the link to my template code at pastebin.com Template code

    Im going to try and look at some of this and see if i can get anything to work.

    Thread Starter Shadowz

    (@shadowz)

    I finally got it, i made the template work now like a normal blog posts sorted by category, creating 3 featured posts, having the read more feature work with the posts, and have the style.css control the styles of the texts and titles.

    Soem how you gave me an idea and i found the right document

    These had good info on building a template with posts and sorting by category and other things The Loop
    I figured out that you have to pretty much manullay add a few things to a template page for it to work right, other wise simply adding

    if ($count <= 3) {
     the_title;
     the_content;
    } else {
      the_title;
    }

    just places the raw text and title on the page and doesn’t work well.

    So here is the final template My Page of Posts template

    Thanks for the help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Need Help With Category Page Template!’ is closed to new replies.