Before you ask please READ THIS

Create a new Portfolio

edited December 2011 in Airlock Posts: 4
Hi,

In the Airlock theme, there's only one portfolio template. I would like to have another page with the portfolio template, for example, a 'members' page with the same template as portfolio, but different pages... got it? like it it had 2 different portfolios.

One linked to our works and another linked to members.


For example:

Portfolio
Featured > All > Advertise > Graphics > Motion

Members
All > Staff > Directors > Employees



Best Regards,

Comments

  • AirAir
    Posts: 10,970
    Hey.

    Not possible due to Wordpress current limits.
    Only way of dividing portfolio type is its categories.

    with regards.
  • Bah ok, Thank you and keep the nice work.
    Best Regards
  • We managed to work this out, by having a special category that we use to separate all the current portfolio items with the "upcoming" portfolio items.

    Basically, we just duplicated the taxonomy-skills.php file, renamed it (i.e. taxonomy-upcoming.php), then added some PHP code:

    $isUpcoming = false;
    if( count( $term_list ) ):
    foreach($term_list as $term) {
    if ($term->slug == "upcoming") {
    $isUpcoming = true;
    }
    }
    endif;

    We then modified the original taxonomy-skills.php file to essentially do the opposite.
  • AirAir
    edited December 2011 Posts: 10,970
    Good:-) Manual way is always something, but it is getting hard when you would like to make it automatic from theme. Also back button in portfolio item won't work in new portfolio. There may appear some other issues, but main functionality should be covered.
    Anyway great job, I hope it will help some users :-)
    Remember to back it up before update.

    With regards.
    Post edited by Air on
  • edited December 2011 Posts: 13
    Yes, you also need to modify the breadcrumb code as well.

    Here's an example:


    <?php
    $term_list = wp_get_post_terms($post->ID, 'skills', array("fields" => "all"));
    $isUpcoming = "NO";
    if( count( $term_list ) ):
    foreach($term_list as $term) {
    if ($term->slug == "upcoming") {
    $isUpcoming = "YES";
    }
    }
    endif;
    if ($isUpcoming == "YES") {
    next_post_link_plus( array(
    'format' => '%link',
    'link' => '« Previous Project',
    'ex_cats' => '46,23,24,22,25',
    'ex_cats_method' => 'diff'
    ));
    } else {
    next_post_link_plus( array(
    'format' => '%link',
    'link' => '« Previous Project',
    'in_same_cat' => false,
    'ex_cats' => '74',
    'ex_cats_method' => 'strong'
    ));
    }
    ?>
    <?php
    if ($isUpcoming == "YES") {
    previous_post_link_plus( array(
    'format' => '%link',
    'link' => 'Next Project »',
    'ex_cats' => '46,23,24,22,25',
    'ex_cats_method' => 'diff'
    ));
    } else {
    previous_post_link_plus( array(
    'format' => '%link',
    'link' => 'Next Project »',
    'in_same_cat' => false,
    'ex_cats' => '74',
    'ex_cats_method' => 'strong'
    ));
    }
    ?>
    Post edited by latenitefilms on
  • Posts: 95
    Hi latenitefilms
    This sound cool

    Is it possible to share the boty modiefied Files (taxonomy-skills.php and taxonomy-upcoming.php) ?

    this would be great.
    Im not a profi in programming.

    thanks
  • I would be happy to - however, we have modified the theme significantly, so if you used our files it would probably break your site. Sorry!

    Also, you will need to specifically "hard code" the category IDs. In the example above for instance, I have had to code it so that only certain categories get listed:

    'ex_cats' => '46,23,24,22,25',

    Maybe Apollo13 can help you?
  • Posts: 95
    Hi latenitefilms
    absolutelly no Problem
    anyway thanks.
Sign In or Register to comment.