WordPress.org

Ready to get started?Download WordPress

Forums

MT Guy Needs Help Understanding WP Category Templates (3 posts)

  1. HTHTR-James
    Member
    Posted 7 years ago #

    I'm a long time MT guy who jumped at the chance to learn WP at a clients request. Now, I'm regretting it. Not because WP is a bad piece of software. Obviously, hundreds if not millions of bloggers use and customize it every day without fail. I just can't seem to wrap my head around it, especially the template system and category templates. I have read almost every page in the codex regarding category pages, some several times - and I'm still not getting it. I understand that everything is built in the users browser. No static files (like MT). If someone could give me a few thought confirmations/suggestions, I'd appreciate it...

    1) The category template is named "category-4.php" and is located in the same folder as all other template files ("/wp-content/themes/guide/") - note that all my theme files are in a folder named "guide", the theme selector is set to that theme, and I only want entries from category 4 to appear.

    2) So lets say I want to display that particular category page by typing the direct url into my browser. I would type "http://mysite.com/category4name/" and it should appear, right? Nope, it defaults to "index.php" on the root of my site. Note that in the WP "options" I have the custom structure defined as "/%category%/%postname%/".

    I've been searching around for a "WP templates for MT idiots" like explanation, and only found one that seemed promising, but is unfortunately no longer available. Does anyone know of any other resource out there that might help me along in wrapping my head around this. The codex isn't helping me, I've read it all. I've searched the forums.

    I'm obviously frustrated. I took to MT quickly, but I've heard that WP is far more flexible and easier to use. I know I will eventually read something and it will all just click. So far, no go. Hoping someone here can point me in the right general direction.

    Thanks for your time.

    --James

  2. Class
    Member
    Posted 7 years ago #

    The filenames are preset, IE "index.php" has a call to the function get_header() etc.

    Start customizing the default theme, insert textcomments in various places and examine the output, you'll see how it works.

    There are several howto's, like this: http://www.urbangiraffe.com/2005/04/12/themeguide1/

  3. moshu
    Member
    Posted 7 years ago #

    "http://mysite.com/category4name/" and it should appear, right?
    No, it shouldn't.
    The correct URL is
    example.com/category/category4name
    Explanation: your defined "permalink structure" (%category%/%postname%) refers to the single post view.

    For the category archive (this is what you are talking about) WP automatically inserts the word "category" in URL ... unless you replaced with something else in the permalink settings page (category base field).

    As for trying to understand, please, visit my visual anatomy of a theme.
    There is also the Template Hierarchy page (in case you didn't see it) in the Codex: http://codex.wordpress.org/Template_Hierarchy

Topic Closed

This topic has been closed to new replies.

About this Topic