Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #911

    Is it possible to use a new template for the individual portfolio item pages other than (what I assume to be) the single.php? If not, can I point the links from each item on the portfolio main area to pages that I can apply a template to? Any help is appreciated.

    #33347

    Hey,

    have a look at this tutorial: http://www.kriesi.at/support/topic/i-want-to-display-my-portfolio-entries-or-posts-without-a-sidebar – of course you can modify the template as you like (not just remove the sidebar) :)

    #33348

    Spot on. Just what I needed. Thanks for getting back to me so quickly.

    #33349

    Dude-

    Plug-in is perfect, one more thing if I can add-on…can I add a custom sidebar to the logic already in place in the sidebar.php file? So when I go to this new template page I can have a special sidebar for it. Can find any area for registering sidebars as I am accustomed to (in the function file for example), so would appreciate the help.

    #33350

    In widgets.php you can register a new widget area. Just use following code and add it to the other registration functions:

    register_sidebar(array(
    'name' => 'Custom Widget',
    'before_widget' => '<div id="%1$s" class="box_small box widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="widgettitle">',
    'after_title' => '</h3>',
    ));

    Then open up sidebar.php and replace:

    //Frontpage sidebars:
    if ($k_option['showSidebar'] == 'frontpage' && dynamic_sidebar('Frontpage Sidebar') ) : $default_sidebar = false; endif;

    with:

    //Custom sidebar:
    if ( $my_template == '1' && dynamic_sidebar('Custom Widget') ) : $default_sidebar = false; endif;
    ////Frontpage sidebars:
    if ($k_option['showSidebar'] == 'frontpage' && dynamic_sidebar('Frontpage Sidebar') ) : $default_sidebar = false; endif;

    At least set a variable in your template like:

    <?php
    $my_template = '1';
    ?>

    #33351

    Many thanks. Got it worked out.

    #33352

    Hey,

    Glad to hear this worked out for you.

    Let us know if you have any other questions.

    James

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Portfolio Page Template or Alternate Page’ is closed to new replies.