WordPress.org

Ready to get started?Download WordPress

Forums

Awesome Filterable Portfolio
show zero items by default (2 posts)

  1. quinox
    Member
    Posted 11 months ago #

    Hi,

    Is it possible to show zero (0) items by default and only show the items when clicking on a category link?

    http://wordpress.org/plugins/awesome-filterable-portfolio/

  2. quinox
    Member
    Posted 10 months ago #

    Hi,

    I urgently need to know how not to show all portfolio items by default, but only from one single categorie.

    I think it is in this piece of code, but my Javascript is not that good at all.

    //Start Echo Categories
            $output.='<ul id="afp-filter">
            ';
            foreach ( $cats as $cat ){
                	$output.='
    <li><a href="#">cat_name) . '">' . $cat->cat_name . '</a></li>
    ';
            }
            $output.='';
    		//End Echo Categories
    
    		//Start Echo Portfolio Items
            $output.='<ul class="afp-items">';
            $k = 1;
            foreach ($items as $item ){
                	$output.='<li class="afp-single-item" data-id="id-' . $k . '" data-type="' . ereg_replace("[^A-Za-z0-9]", "", $item->item_category) .'">
                    <a>item_description . '" href="' . $item->item_image . '"><img alt="" class="img-link-initial" src="' . $item->item_thumbnail . '"></a>
                    <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>item_link . '">Project Link</a></li>
    '; }
                    $output.='
                ';
    
                $k++;
    		}
            $output.='
    
        </div>

    Can someone please help me with this?

    Kind regards,

    Roland

Reply

You must log in to post.

About this Plugin

About this Topic