WordPress.org

Ready to get started?Download WordPress

Forums

What's exactly the purpose of inc folder in a theme? (2 posts)

  1. Mayeenul Islam
    Member
    Posted 1 year ago #

    I Googled it, but found no satisfactory answer about it. Why is the inc folder implemented in TwentyTwelve & TwentyEleven?

    I found that, the inc folder is to store widgets.php file. I don't understand, why?

    Then what is the purpose of inc folder exactly?

    The TwentyTwelve theme placed the custom-header.php (a function + css file for custom header) in the inc folder. What if I place the file in a folder named header? or simply place the file into the root? What special with the inc folder?

    I got the folder hierarchy, but can't understand the purpose of the inc folder.

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    What special with the inc folder?

    nothing.

    my personal opinion is, that it was done just to show that themes do not need to be organized within one single folder, but can have subfolders for some of the templates and files.

    different from the 'template' hierarchy, there seems to be no 'folder' hierarchy in themes.

Topic Closed

This topic has been closed to new replies.

About this Topic