Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #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:

    <ul id=”filter-portfolio”>


    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;



    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; ?>’>


    $slider = new avia_slideshow(get_the_ID());

    $force_display = true;

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




    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>’);



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

    echo “</div>”;




    $hr_class = ‘hr_invisible';



    <!– end post-entry–>



    $extraClass = “”;

    if($loop_counter > $avia_config)


    $loop_counter = 1;

    $extraClass = ‘first';

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





    <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>




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

    if(!isset($avia_config ))

    echo avia_pagination();




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

    get_the_terms( get_the_ID(), 'portfolio_entries' )


    <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”>


    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' ) );


    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 :/


    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 :(


    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).


    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.