• Hi, this is my first time dealing with themes.

    For organizational purposes is there a constant I can define that will tell WordPress to search specific pathway to find the Theme’s php templates?

    I don’t like how cluttered and disorganized a theme at first glance can look depending on the files of that theme.

    Originally a theme hierarchy might be…

    wp-content/theme/index.php
    wp-content/theme/single.php
    wp-content/theme/header.php
    wp-content/theme/footer.php

    I would like to change the location of the theme hierarchy…

    wp-content/theme/core/php/index.php
    wp-content/theme/core/php/single.php
    wp-content/theme/core/php/header.php
    wp-content/theme/core/php/footer.php

    It would be much better if I could define different constants for different php template files so I could organize them even more. Such as…

    wp-content/theme/core/php/index.php
    wp-content/theme/core/php/header.php
    wp-content/theme/core/php/footer.php
    wp-content/theme/core/php/page/page.php
    wp-content/theme/core/php/page/page-blank.php
    wp-content/theme/core/php/blog/single.php
    wp-content/theme/core/php/blog/post.php
    wp-content/theme/core/php/blog/sidebar.php
    wp-content/theme/core/php/woocommerce/product-single.php

    Reference: Template Hierarchy.

    If there is nothing like this, how can I submit something like this to WordPress core?
    Is that allowed?

    Thanks gurus!

  • The topic ‘Constant for Template Hierarchy?’ is closed to new replies.