Support » How-To and Troubleshooting » WordPress theme files are out of order

WordPress theme files are out of order

  • 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

Viewing 15 replies - 1 through 15 (of 18 total)
  • Modification times?

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

    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?

    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.)

    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.

    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).

    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?

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

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

    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…

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

    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.

    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.

    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.

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

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘WordPress theme files are out of order’ is closed to new replies.
Skip to toolbar