WordPress.org

Ready to get started?Download WordPress

Forums

My new theme not working - don't know why (20 posts)

  1. bnita
    Member
    Posted 7 years ago #

    Hi,

    I've created all of the necessary templates for a new theme, installed them in the correct place and chose the theme, but when I do, absolutely *nothing* shows up.

    I have a regular index.html page in the root directory right now, but when I disable it to have the WP files take over, I literally get a blank page with no content, no code or anything.

    Can anyone tell me what that means? what is the tool grabbing instead of my template files?

    tia!

  2. moshu
    Member
    Posted 7 years ago #

    The blog works - I can see a nice Gemini theme... so it might be something wrong with your theme.

  3. bnita
    Member
    Posted 7 years ago #

    Sorry, I should be more specific -- that is my personal blog, not the one that I am working on now.

    The one in question is http://www.richardferri.com.

    I will disable the index.html page and active the template so that you can see what I am talking about.

  4. moshu
    Member
    Posted 7 years ago #

    Just to exclude a more general issue: does it work if you switch to the classic or default theme?

  5. bnita
    Member
    Posted 7 years ago #

    yes, it does! but then there is still an issue of not all of the pages and posts loading...

    my main concern right now is that the theme does not seem to be recognized by the system, and I thought I had all of the necessary files there.

  6. moshu
    Member
    Posted 7 years ago #

    Without seeing the template files and their code it is difficult to figure out what went wrong...
    Obviously it must be something witht the theme, if it works with the two packaged themes.
    I assume you are familiar with this Codex page (if the Codex is online...)
    http://codex.wordpress.org/Theme_Development

  7. Chris_K
    Member
    Posted 7 years ago #

  8. bnita
    Member
    Posted 7 years ago #

    I did read the codex to determine how to break the template for the theme up into the template files.
    I defined the necessary info. in the stylesheet, and it does show up in admin panel > presentation > themes.

    I've created
    style.css
    index.php (to be used for posts and pages)
    home.php (wanted a static homepage with a different layout than the subpages)
    category-2.php
    category-3.php
    header.php
    sidebar.php
    footer.php
    single.php
    archives.php

    Is there any thing that I may be missing in the template files that causes them to looked over by the app?

  9. moshu
    Member
    Posted 7 years ago #

    In that case I am clueless :(
    Maybe if you can find somebody to test the theme on another install...

  10. bnita
    Member
    Posted 7 years ago #

    How about this -- I will post the code for the header -- maybe you can glean something from that...

    [code moderated]

    The main wp calls are the same as the header.php in the default theme, save for the omission of the styles.

    Anyone have any ideas?

  11. moshu
    Member
    Posted 7 years ago #

    Not a good idea - nobody reads long code here...
    If you need to post long code, use http://wordpress.pastebin.ca and post back with the URI.

  12. bnita
    Member
    Posted 7 years ago #

    Sorry about that -- still a newbie to this bb.

    Here is the pastebin URL: http://wordpress.pastebin.ca/243188

    If anyone is willing to check it out, that would be great.

    tia!

  13. moshu
    Member
    Posted 7 years ago #

    I can't see anything... but my eyes are begging for some new glasses :)

  14. Kafkaesqui

    Posted 7 years ago #

    <?php wp_list_pages('title_li=(' ')' ); ?>

    Not sure it's causing this problem, but it surely will cause *a* problem. Try modifying it to:

    <?php wp_list_pages('title_li='); ?>

  15. Evita
    Member
    Posted 7 years ago #

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    You have to give your style.css a name.
    Theme Name: your name

    In your header.php you have to write this name as title:
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" title="your name" type="text/css" media="screen" />

  16. bnita
    Member
    Posted 7 years ago #

    Thanks for the feedback.

    The name of the stylesheet *is* style.css -- I kept it that way so that I wouldn't have to change it in the templates. Just lazy, I guess. :)

    I thought ('stylesheet_url') automatically looked for style.css in the theme folder, and therefore, I didn't have to put in the path to the stylesheet. Is that wrong? Should I put ('style.css'); instead?

    And if that is so, should this line be like this instead?
    <link rel="stylesheet" href="<?php bloginfo('style.css'); ?>" title="RichardFerri" type="text/css" media="screen" />

    ?

  17. bnita
    Member
    Posted 7 years ago #

    the codex page http://codex.wordpress.org/Template_Tags/bloginfo says that bloginfo with the parameter of ('stylesheet_url') works like this:

    "'stylesheet_url' - URL for primary CSS file. Returns: http//example.com/wp-content/themes/ + your-active-theme-name(value from wp_options, "stylesheet" row) + "/style.css"(hardcoded in functions.php)"

    so I don't think I need to hardcode the path of the stylesheet there...

  18. Kafkaesqui

    Posted 7 years ago #

    You don't. And it wouldn't work by passing it through bloginfo().

    Also, use of the title attribute in the stylesheet link tag is optional. You do not *have* to use it.

  19. bnita
    Member
    Posted 7 years ago #

    okay, good to know.

    I've decided to activate the classic theme for now (which works for some reason) and focus on figuring out why the posts and pages won't load.

    Is there anything (page, code) that is essential to be in a theme folder for the theme to work correctly that I may have forgotten?

  20. bnita
    Member
    Posted 7 years ago #

    I took a header.php file from the default theme and used the code in it to create a new header.php file for my theme and...it now works!!!

    Thank you everyone for all of your help!

Topic Closed

This topic has been closed to new replies.

About this Topic