WordPress.org

Ready to get started?Download WordPress

Forums

Using an include file? (4 posts)

  1. brettr
    Member
    Posted 7 years ago #

    I'd like to create files that can be edited within the admin. These files will be included in their respective categories inside header.php.

    For example, for cat4, I'll have cat4header.php. Using a conditional in header.php, the contents of cat4header.php will display at the top of every post in category 4. When cat4header.php doesn't have any contents, nothing displays and no space in taken up.

    How can this be done?

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    How would this be different from the existing category templates mechanism?

    http://codex.wordpress.org/Category_Templates

  3. brettr
    Member
    Posted 7 years ago #

    I have a category.php file in the themes/default but it doesn't list under Presentation | Theme Editor. Do I have to edit it offline?

    Thanks,
    Brett

  4. brettr
    Member
    Posted 7 years ago #

    Sorry, I see it is called Category Template. I was looking for categories.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.