Support » Plugins and Hacks » Custom Content Type Manager » [Plugin: Custom Content Type Manager] Trying to use include template path

  • This plugin seems like the perfect one for my use, but I’m having trouble displaying it.

    I created a very simple content type called Home Intro to display an introduction paragraph and place it on my home.php page. However when I use <?php include (TEMPLATEPATH . 'single-home.php'); ?> (single-home.php being the sample template I created to pull onto the homepage), nothing shows up.

    Any ideas or suggestions on how I could include it? I would be doing this frequently on multiple pages.

    http://wordpress.org/extend/plugins/custom-content-type-manager/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor fireproofsocks

    (@fireproofsocks)


    I don’t think I understand your process here… You shouldn’t need to include the “single-home.php” template file like that… if you want content on your home page, then put it on your home page. WP pages can have a dedicated template file, so why not just set up a dedicated theme file for your homepage and put code on that page to display the content you want? I think you’re making this more complicated than it needs to be.

    Yeah, I wanted to use content types in order to limit the area in which someone would be able to make changes to a page.

    My home page is split up into 4 different sections, intro, work, services and contact info, so I wanted to be able to create an area in which one would be able to edit.

    Plugin Contributor fireproofsocks

    (@fireproofsocks)


    Ok, you could make a custom content type, e.g. with only a title and a content field, then in your dedicated home page theme file use a combination of get_post() and get_post_meta() to retrieve and display the content from those other posts — it essentially would be displaying one field from each post.

    There’s a chapter in my book that talks bout how to do this very thing — it’s quite similar to how MODx handles “Chunks”:
    http://www.packtpub.com/wordpress-3-plugin-development-essentials/book

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Custom Content Type Manager] Trying to use include template path’ is closed to new replies.