3

(This post has been submitted on the Yootheme forums but I don't have as much confidence in a solution so I thought I'd post it here too.)

I'm using the Nano theme from Yoothemes and its working great for 90% of my site. http://dofekit.org However I've just installed the bbPress forum plugin (not on the live site, but a local version) and I have created 2 'forums'. The forum index page and all sub-pages seem to be inserted into a standard Nano page template. This is not suitable for the forum as it includes the page meta information and also I see no way of turning off 'sidebar-a' for the forums as my screenshot demonstrates.

http://dl.dropbox.com/u/240752/forums.jpg

Is there a way of creating a separate template for the forum post type within the yoothemes framework? ( I know its kind of proprietary but I can but ask)

Thanks.

UPDATE:

I'm part of the way there. I've manged to make separate templates for my forum post types like so, but I still need to get the custom post types to be acknowledged in the widget settings.

I've added the custom post types in warp/systems/wordpress3.0/layouts/content.php

if (is_home()) {
    $content = 'index';
} elseif (is_page()) {
    $content = 'page';
} elseif (is_attachment()) {
    $content = 'attachment';
} elseif ((is_single()) && (get_post_type() == 'forum')) {
    $content = 'forum-single';
}elseif ((is_single()) && (get_post_type() == 'topic')) {
    $content = 'topic-single';
} elseif (is_single()) {
    $content = 'single';
} elseif (is_search()) {
    $content = 'search';
}elseif ((is_archive()) && (get_post_type() == 'forum')) {
    $content = 'forum-archive';
} elseif (is_archive() && is_author()) {
    $content = 'author';
} elseif (is_archive()) {
    $content = 'archive';
} elseif (is_404()) {
    $content = '404';
}

I've also added these custom post types into warp/systems/wordpress3.0/config/layouts/fields/profile.php in an effort to get them to appear in the dropdown lists on each widget. (I want to be able to toggle widgets on these new custom templates.)

$defaults = array(
    'home'    => 'Home',
    'archive' => 'Archive',
    'search'  => 'Search',
    'single'  => 'Single',
    'page'    => 'Pages',
    'forum-archive' => 'Forum List',
    'forum-single' => 'Forum Single',
    'topic-single' => 'Topic Single'
);

Can anyone please help? I think I'm almost there with this.

Chris J Allen
  • 18,970
  • 20
  • 76
  • 114
  • what exactly do you mean by 'get the custom post types to be acknowledged in the widget settings' ? And is that your only problem or is there more ? 'Can anyone please help' is not the best question to be honest ;) – Anonymous Oct 16 '11 at 21:36

2 Answers2

4

You should be able to handle this using a WordPress Template for your custom post type for single post display.

For example if your custom post type is called "product" create a template called single-product.php e.g. single-{post_type}.php

This solution should work irrespective of Yoothemes framework, Let me know if that works!

Virgil Shelton
  • 782
  • 5
  • 17
1

i'm not shure if my answer can help you but...

My code add the Custom Taxonomy categories to the widget position...

I edit the file warp/systems/wordpress/config/layouts/fields/style.php

and I add this lines for each custom taxonomy =)

// set Eventos cate
    if ($categories = get_categories(array('hide_empty' => 0, 'name' => 'select_name', 'post_type' => 'event', 'taxonomy'  => 'event-category'))) {
        $options[] = '<optgroup label="Eventos | Categorias">';

        foreach ($categories as $category) {
            $val        = 'cat-'.$category->cat_ID;
            $attributes = in_array($val, $selected) ? array('value' => $val, 'selected' => 'selected') : array('value' => $val);
            $options[]  = sprintf('<option %s />%s</option>', $control->attributes($attributes), $category->cat_name);
        }

        $options[] = '</optgroup>';                  
    }

Here... my postype is "event" and my taxonomy is "event-category" in the list of the widget position now you can see all the Categories or Terms of the Taxonomy and y label it with "Eventos | Categorias" for a better identification.

Ok this is only one part of the code and maybe you can take this like a point to start. Now i just can display and list this terms but still nok working :(

so... tnks for the comments and sorry for my english :P

Mimer
  • 11
  • 1