WordPress.org

Ready to get started?Download WordPress

Forums

WordPress theme files are out of order (19 posts)

  1. GaryKing
    Member
    Posted 8 years ago #

    For some reason, my WordPress theme files are not in alphabetical order anymore. What could have caused this to happen?

    This is my order:

    * Stylesheet
    * ie.css
    * dd-formmailer-plugin.css
    * Comments
    * attachment.php
    * Page Template
    * Sidebar
    * functions.php
    * Single Post
    * Header
    * 404 Template
    * Main Index Template
    * searchform.php
    * misc.php
    * Search Results
    * Archives
    * Popup Comments
    * Archives
    * Footer
    * Links

  2. yosemite
    Member
    Posted 8 years ago #

    Modification times?

  3. GaryKing
    Member
    Posted 8 years ago #

    No, otherwise their orders would change. They don't.

  4. moshu
    Member
    Posted 8 years ago #

    What is the question? - Stylesheet always has been the first in that list (and seemingly additional stylesheets go to the top, too).
    There are only a handful of files in a theme... so what's the problem?

  5. GaryKing
    Member
    Posted 8 years ago #

    The files are not in alphabetical order, or in any order that is obvious to me.

    In a default installation of WordPress, the files are usually in alphabetical order (with, yes, the stylesheets at the top.)

  6. whooami
    Member
    Posted 8 years ago #

    the order in which the files are in depends on several things, and none of them have anything to do with wordpress.

    Depending on your ftp client, you can view them based on the last time they were changed, alphabetically, by size, by extension, etc..

    Thats all changable and configurable via whatever ftp client you use.

    if you look at them in cpanel, they are arranged alphabetically (atleast in my cpanel they are)

    Again though, and most importantly wordpress has absolutely nothing to do with what you are describing.

  7. Yngwin
    Member
    Posted 8 years ago #

    Of course WP has something to do with this! It does sort the files, and then put the stylesheets on top. Logically, it should put the rest of the files in alphabetical order, but for some reason it doesn't (not on my server either).

  8. GaryKing
    Member
    Posted 8 years ago #

    Maybe it's a server configuration, then. Could someone at least find the code where it puts the stylesheets at the top of the list, then?

  9. whooami
    Member
    Posted 8 years ago #

    Yngwin, what on Earth are you talking about? "it" doesnt do anything, this whole damn thread is blog-fodder; youre both high.

  10. GaryKing
    Member
    Posted 8 years ago #

    No, Yngwin is right. Stylesheets are always on top, and usually, the remaining files are listed in alphabetical order.

  11. whooami
    Member
    Posted 8 years ago #

    on top where? on your server? I give up. I could take 10 screencaps to show you the folly of this whole thread but why...

  12. GaryKing
    Member
    Posted 8 years ago #

    Theme files on the /wp-admin/theme-editor.php page. Check the right side of the <textarea>.

  13. whooami
    Member
    Posted 8 years ago #

    thats an entirely different question that what you suggested you were asking earlier, and accordingly my earlier answers didnt address that -- since I know how to use an ftp client and a text editor I dont ever look at that screen, consequently I cannnot help you, good luck all the same.

  14. Doodlebee
    Member
    Posted 8 years ago #

    Here's a question - what are the actual *filenames*? I've always found that the list is in order - by FILENAME - not the file's title. Stylesheets first, then the rest in aphabetical order by filename. If you don't want the file *titles* displayed, then you need to go to each file and remove the "Template Name" area in the top of the file.

  15. whooami
    Member
    Posted 8 years ago #

    the line that that takes care of this is inside the file he mentioned in his last post.

    `$allowed_files = array_merge($themes[$theme]['Stylesheet Files'], $themes[$theme]['Template Files']);'

    and fwiw, my files are not in alphabetical order.

  16. GaryKing
    Member
    Posted 8 years ago #

    doodlebee, I don't change the default filenames so they should be in alphabetical order like always.

  17. Doodlebee
    Member
    Posted 8 years ago #

    No, I'm not saying that :) I'm saying that maybe the "Template Name" in each of the files is why it's showing up out of alphabetical order.

    For example, say I had three files: stylesheet.css, index.php and sidebar.php. In each of those files, I had a commented-out section with "Template Name" in them. Just for fun, I felt very French and named the index page "Ze home page" and the sidebar's template name would be "A list of stuff".

    In the side of my Admin area, the list would show up as:

    stylesheet
    Ze Home Page
    A list of stuff

    because the *filenames* were still in alphabetical order.

    I'm not saying you did anything to the files, I was just wondering if each file had a "template name" and maybe that's why it's throwing you off. Maybe the creator of the theme named them something different than what the filename is - so it's showing in order of filename (but the title is different) and thus throwing you off.

    Make sense?

  18. GaryKing
    Member
    Posted 8 years ago #

    I'm using the default theme, so nothing was changed from default. The filenames are generally the same, too. I have never used a theme where the creator would change the filenames of core files, although I'm sure they exist, but not normally.

  19. GaryKing
    Member
    Posted 8 years ago #

    Any suggestions?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags