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.
Portfolio Page Template or Alternate Page
7 posts from 3 voices-
Posted 2 years ago #
-
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) :)Posted 2 years ago # -
Spot on. Just what I needed. Thanks for getting back to me so quickly.
Posted 2 years ago # -
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.
Posted 2 years ago # -
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'; ?>Posted 2 years ago # -
Many thanks. Got it worked out.
Posted 2 years ago # -
Hey,
Glad to hear this worked out for you.
Let us know if you have any other questions.
James
Posted 2 years ago #
Reply
You must log in to post.














