php - Wordpress Awesome Filterable portfolio plugin -


currently i'm working on project have installed wordpress plugin site called 'awesome filterable portfolio plugin'. plugin show portfolio items in categories.

the plugin working fine , aspected. however, clients wants show not portfolio items default, when going portfolio page, 3 portfolio items category; in case 'visitekaartjes'.

i raised question plugin developer, never got reply on wordpress plugin support page.

my knowledge of php limited, i'm struggling last item done. but, have idea look, after searching , trial & error days, doesn't eureka moment. that's why i'm trying luck here.

here's code:

$items = $wpdb->get_results('select * ' . $wpdb->prefix . 'afp_items order ' .     $orderby);     if( $afpoptions['sort_cat'] == 'on' ){         $orderby = ' order cat_name';     } else {         $orderby = '';     }     $cats = $wpdb->get_results('select * ' . $wpdb->prefix . 'afp_categories' . $orderby);     ?>      <?php          //afp main container         $output='<div class="afp-clear"></div>         <div id="afp-container">';          //start echo categories     $output.='<ul id="afp-filter">     ';      foreach ( $cats $cat ){             $output.='<li><a href="#" class="' . ereg_replace("[^a-za-z0-9]", "", $cat-  >cat_name) . '">' . $cat->cat_name . '</a></li>';     }     $output.='</ul>';         //end echo categories          //start echo portfolio items     $output.='<ul class="afp-items">';     $k = 1;     foreach ($items $item ){             $output.='<li class="afp-single-item" data-id="id-' . $k . '" data-type="' .  ereg_replace("[^a-za-z0-9]", "", $item->item_category) .'">             <a class="fancybox" title="' . $item->item_description . '" href="' . $item->item_image . '"><img alt="" class="img-link-initial" src="' . $item->item_thumbnail . '"></a><br />             <ul class="afp-item-details">';                 if($item->item_title != null) { $output.='<li><strong>' . $item->item_title . '</strong></li>'; } if($item->item_client != null) { $output.='<li>' . $item->item_client . '</li>'; } if($item->item_date != '0000-00-00') { $output.='<li>' . date("m/d/y", strtotime($item-  >item_date)) . '</li>'; } if($item->item_link != null) { $output.='<li><a target="_' . $afpoptions['project_link'] . '" href="' . $item->item_link . '">project link</a></li>'; }             $output.='</ul>         </li>';          $k++; }     $output.='</ul> 

hope can me this.

thanks in advanced,

roland

if want allow visitor click button , view more or items maybe should implement clientside using javascript & css. (unless have thousands of items in portfolio) set height of container height of 1 row of items. , create button extend height, show either 1 row @ time or show items @ ones.

i implemented myself on http://annual-insight.nl/referenties/ can check file: http://annual-insight.nl/wp-content/plugins/ai-referenties/js/air-functions.js see did there.

it requires portfolio items of equal height.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -