Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #5533

    hello again.. i’m trying to implement portfolio filter system to the brightbox.. but i’m stuck in the middle..

    if i’m right, if i add category name to the class on the listing, that will solve my problem but i couldn’t find it anywhere.. would you mind help me about that?

    i need add:

    <li class=’post-entry all ***************category name which post belong -*********************** <?php echo $grid.’ ‘.$extraClass; ?>’>

    btw i’m trying to do this filter technique:

    http://www.wearepixel8.com/work/#all

    <ul id=”filter-portfolio”>

    <?php

    global $avia_config;

    if(isset($avia_config)) { query_posts($avia_config); }

    // check if we got a page to display:

    if (have_posts()) :

    $loop_counter = 1;

    $extraClass = ‘first’;

    $grid = ‘grid3′;

    $image_size = ‘page’;

    $showcaption = true;

    $hr_class = “hr”;

    if(empty($avia_config)) $avia_config = 4;

    switch($avia_config)

    {

    case 1: $grid = ‘grid12′; $image_size = ‘page’; if(isset($avia_config)) $image_size = ‘featured’; break;

    case 2: $grid = ‘grid6′; $image_size = ‘portfolio2′; break;

    case 3: $grid = ‘grid4′; $image_size = ‘portfolio3′; break;

    case 4: $grid = ‘grid3′; $image_size = ‘portfolio’; $showcaption = false; break;

    }

    //iterate over the posts

    while (have_posts()) : the_post();

    ?>

    <li class=’post-entry all <?php echo $grid.’ ‘.$extraClass; ?>’>

    <?php

    $slider = new avia_slideshow(get_the_ID());

    $force_display = true;

    echo $slider->display_small($image_size, $force_display, $showcaption);

    //$showcaption

    if(!isset($avia_config))

    {

    echo “<h1 class=’post-title’>“.get_the_title().”</h1>”;

    echo ‘<div class=”entry-content”>’;

    if($avia_config == 1)

    {

    echo get_the_term_list( get_the_ID(), ‘portfolio_entries’, ‘<span class=”blog-categories”>‘.__(‘Categories’, ‘avia_framework’ ).’: ‘, ‘, ‘,’</span>’);

    }

    the_excerpt();

    echo ‘‘.__(‘Read more’,’avia_framework’).’‘;

    echo “</div>”;

    }

    else

    {

    $hr_class = ‘hr_invisible’;

    }

    ?>

    <!– end post-entry–>

    <?php

    $loop_counter++;

    $extraClass = “”;

    if($loop_counter > $avia_config)

    {

    $loop_counter = 1;

    $extraClass = ‘first’;

    echo “<div class=’$hr_class’></div>”;

    }

    endwhile;

    else:

    ?>

    <div class=”entry”>

    <h1 class=’post-title’><?php _e(‘Nothing Found’, ‘avia_framework’); ?></h1>

    <p><?php _e(‘Sorry, no posts matched your criteria’, ‘avia_framework’); ?></p>

    </div>

    <?php

    endif;

    if($loop_counter != 1){ echo “<div class=’hr’></div>”; }

    if(!isset($avia_config ))

    echo avia_pagination();

    ?>

    #50747

    Hey,

    you can use following code inside the loop to retrieve all post terms (“portfolio categories”):

    get_the_terms( get_the_ID(), 'portfolio_entries' )

    #50748

    <li class=’post-entry all <?php echo get_the_terms( get_the_ID(), ‘portfolio_entries’ ); ?> <?php echo $grid.’ ‘.$extraClass; ?>’>

    uhm, when i use that code in that style i just get this result:

    <li class=”post-entry all Array grid3 first”>

    #50749

    Yes of course – the output is an array. You need to use following code to list all tags in a string:

    $tags = implode(" ", get_the_terms( get_the_ID(), 'portfolio_entries' ) );

    #50750

    when i use something like that it breaks the page and do not load after that code starts:

    <li class=’post-entry all <?php echo $tags = implode(” “, get_the_terms( get_the_ID(), ‘portfolio_entries’ ) ); ?> <?php echo $grid.’ ‘.$extraClass; ?>’>

    :( i just need type the name what portfolio item belongs the category as a class name to the li tag :/

    #50751

    my fault :)

    i added $tags to that list…

    $grid = ‘grid3′;

    $image_size = ‘page’;

    $showcaption = true;

    $hr_class = “hr”;

    $tags = implode(” “, get_the_terms( get_the_ID(), ‘portfolio_entries’ ) );

    than i use li tag like that

    <li class=’post-entry all <?php echo $tags; ?> <?php echo $grid.’ ‘.$extraClass; ?>’>

    but nothing happens.. what am i doing wrong :(

    #50752

    Not sure – as I said before it’s a time intensive and complex task which requires some debugging & programming skills. Imho you must add a category navigation which triggers the sort function and check if the css interferes with the filter function (as far as I know you need a fixed margin top to the main menu).

    #50753

    so how is this tag line in the other templates? i think broadscope and brightbox are similar. that thing works in this theme but brightbox. wouldn’t be easier to take a look at brightbox’s code line?

    i think i’ll buy broadscope just because of that :/

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

The topic ‘How to find Portfolio Category name or id?’ is closed to new replies.