Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #206759

    Hi There,

    How can I sort the Category Filters alphabetically but the portfolio items by Date? They seem to sync right now.

    Also, is it possible to set up a category page where it only shows the items of that specific category?
    For example, I have a category for BOOKS, but I want to allow the user to access a page where a listing of just the BOOKS category is shown, is this possible?

    Please advise, thank you

    #206877

    Hi soulpatty!

    1- Please go to wp-content\themes\angular\includes folder and open loop-portfolio.php file and find

    $args = array(
    	
    		'taxonomy'	=> 'portfolio_entries',
    		'hide_empty'=> 0,
    		'include'	=> $includeArray

    and change it to

    $args = array(
    	
    		'taxonomy'	=> 'portfolio_entries',
    		'hide_empty'=> 0,
                    'orderby' => 'title',
    		'order' => 'DESC'
    		'include'	=> $includeArray

    2- In WordPress dashboard, please go to Portfolio Items > Categories and click View on the portfolio category to see link to archive http://i.imgur.com/bV9NJl6.jpg

    Regards,
    Yigit

    #207206

    Hi Yigit,

    Thanks for the reply.

    However, for the order issue, I already changed the code to that.

    But I want the CATEGORY FILTERS to be ordered by title, and the PORTFOLIO ITEMS to be ordered by date, the above code just orders both by date.

    Please kindly advise, thank you!

    #207225
    #207234

    Hi Devin,

    Sorry I’m confused, how is this different from YIgit’s reply? This just sorts the category filters as I want to, I had figured this out myself originally already but I can’t get the PORTFOLIO ITEMS ( as in each individually displayed thumbnail/title) to be ordered by DATE instead of how the category filter is sorted (which is by title alphabetically right now)

    Do I need to set up another order sorting coding for the portfolio_category instead?

    Please kindly advise,

    Thanks,

    #207248

    Right now I have it like this

    $args = array(

    ‘taxonomy’ => ‘portfolio_entries’,
    ‘hide_empty’=> 0,
    ‘include’ => $includeArray,
    ‘orderby’ => ‘title’, /*date*/
    ‘order’ => ‘ASC’ /*desc*/

    );

    So the category filter is working fine, but the Portfolio Items are being ordered by title as well automatically even though I want them to be ordered by date. However, when i change orderby to date, only the category filter is organized by date but the portfolio items continues to be ordered by title…..how can I change it so the portfolio item is ordered by date?

    #207249

    Hey!

    If you want to sort the order of the portfolio items by date, please edit includes > helper-templates.php. Find this code on line 579:

    $avia_config['new_query'] = array("paged" => get_query_var( 'paged' ),  "posts_per_page" => $avia_config['portfolio_item_count'],  "post_type"=>"portfolio"); 
    		}
    		else
    		{		
    			$avia_config['new_query'] = array(	"paged" => get_query_var( 'paged' ), 
    												"posts_per_page" => $avia_config['portfolio_item_count'],  
    												'tax_query' => array( array( 'taxonomy' => 'portfolio_entries', 
    																			 'field' => 'id', 
    																			 'terms' => explode(',', $portfolio_cats_dynamic) , 'operator' => 'IN'))

    Replace it with:

    $avia_config['new_query'] = array("paged" => get_query_var( 'paged' ),  "posts_per_page" => $avia_config['portfolio_item_count'],  "post_type"=>"portfolio", "orderby" => "name", "order" => "DESC"); 
    		}
    		else
    		{		
    			$avia_config['new_query'] = array(	"paged" => get_query_var( 'paged' ), 
    												"posts_per_page" => $avia_config['portfolio_item_count'],
    												"orderby" => "date", "order" => "DESC",  
    												'tax_query' => array( array( 'taxonomy' => 'portfolio_entries', 
    																			 'field' => 'id', 
    																			 'terms' => explode(',', $portfolio_cats_dynamic) , 'operator' => 'IN'))

    Remove browser cache then reload the page. Refer to this link for more order parameters: http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

    Regards,
    Ismael

    #207255

    Hey Ismael,

    It’s still being organized alphabetically….

    Was that a typo “orderby” => “name”, “date” => “DESC”?
    I tried your code and then my modified below, neither worked :(

    
    $avia_config['new_query'] = array("paged" => get_query_var( 'paged' ),  "posts_per_page" => $avia_config['portfolio_item_count'],  "post_type"=>"portfolio", "orderby" => "date", "order" => "DESC"); 
    		}
    		else
    		{		
    			$avia_config['new_query'] = array(	"paged" => get_query_var( 'paged' ), 
    												"posts_per_page" => $avia_config['portfolio_item_count'],
    												"orderby" => "date", "order" => "DESC",  
    												'tax_query' => array( array( 'taxonomy' => 'portfolio_entries', 
    																			 'field' => 'id', 
    																			 'terms' => explode(',', $portfolio_cats_dynamic) , 'operator' => 'IN'))
    
    #207261

    Hey!

    Sorry, my bad. I edited the code. It works on my end. Please remove browser cache then reload the page a few times. Test it on another browser. Refer to this link for more order parameters: http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

    Cheers!
    Ismael

    #207274

    Hi Ismael,

    I got no luck, I tried on 3 different browsers and 2 different computers.
    Would it help if I showed you the site? I’ll ask the owner for permission, this is driving me nuts…

    Or I can show you the coding I have for the 2 key files that effects the sorting for the portfolio page?

    Thanks,

    #207291

    Hey!

    Please give us a link to the portfolio page then post the login details here as a private reply. We would like to inspect it. Do you have a cache plugin? Please do the changes above then flush the cache settings.

    Regards,
    Ismael

    #207297
    This reply has been marked as private.
    #207330

    Also, regarding #2 which was replied by Yigit as: 2- In WordPress dashboard, please go to Portfolio Items > Categories and click View on the portfolio category to see link to archive

    What I was looking for is the coding, so with the original code in loop-portfolio-single.php, there is a snippet for previous_post_link() and next_post_link(), how can I swap it out so I can use something like the breadcrumb function get_category_parents() so that I can set up a link that allows the user to go back to its parent portfolio category page?

    I also want to add a link that allows the user to go back to the main portfolio page where all the portfolio items are displayed, what do I need to do to hard code this?

    Thanks!

    #207336
    This reply has been marked as private.
    #208629

    Hi!

    1) You can change the order by modifying the query parameters. Open up /wp-content/themes/angular/includes/loop-portfolio.php and replace

    
    if(isset($avia_config['new_query'])) { query_posts($avia_config['new_query']); }
    

    with

    
    if(isset($avia_config['new_query'])) {
    $avia_config['new_query']['orderby'] = "date";
    $avia_config['new_query']['order'] = "ASC";
    query_posts($avia_config['new_query']);
    }
    

    You can replace ASC with DESC if you want a descending order.

    2) Insert following code into the quick css field

    
    .archive.tax-portfolio_entries .sidebar{
    display: none !important;
    }
    
    .archive.tax-portfolio_entries .template-portfolio-overview.content{
    width:100% !important;
    }
    

    Regards,
    Peter

    #208785

    Hi Peter,

    Those worked great!! You guys are awesome, best support ever, will definitely keep purchasing your themes.

    One more quick question from one of the posts I made above, if I want to code in a link to the “ALL” page and a link to the single portfolio item’s parent category page, how do I do that? Right now the original theme has the previous/next portfolio items, and I want to replace them with back to “ALL” and/or back to the item’s parent category.

    I tried several coding by modifying the code below in loop-portfolio-single,php but with no luck

    <div class='post_nav extralight-border'>
    						<div class='previous_post_link_align'>
    							<?php previous_post_link('<span class="previous_post_link">&larr; %link </span><span class="post_link_text">'.__('(previous entry)')."</span>"); ?>
                                
    						</div>
    						<div class='next_post_link_align'>
    							<?php next_post_link('<span class="next_post_link"><span class="post_link_text">'.__('(next entry)').'</span> %link &rarr;</span>'); ?>
    						</div>
    					</div>

    Please kindly advise, thanks!

    • This reply was modified 11 months, 1 week ago by  soulpatty.
    #208787
    This reply has been marked as private.
    #208841

    Hey!

    It seems like you’re using a modified archive page for the portfolio items. By default the archive page looks like http://www.kriesi.at/themes/angular/portfolio_entries/css/ but on your website it uses the “portfolio page” template with the grid layout, etc.
    The isotope filter effect is not fully compatible with the archive layout and thus it loads all items in the first column. If you want to fix this issue please switch back to the default category template (it will also remove the filters btw). If you want to stick with the modified archive template I can’t help you with the “load” issue because it’s related to a theme customization (I suggest to hire a freelancer to look into it). However you can hide the links with

    
    .archive #js_sort_items{display: none !important;}
    

    If you want to add a link back to the portfolio page open up /wp-content/themes/choices/includes/loop-portfolio.php and replace

    
    $sortable = "avia_not_sortable";
    

    with

    
    echo '<a href="http://2brand.me/clients/charwei/projects/">Back to Projects</a>';
    
    $sortable = "avia_not_sortable";
    

    and change the url/link text if necessary.

    Best regards,
    Peter

    #208863

    Hi Peter,

    I dont remember specifically changing the archive page to the portfolio template, I don’t need it to stay in a grid, the list layout is fine, where do I go to see why this is happening?

    Thanks,

    #208877

    Hey!

    Please search for a file called “taxonomy-portfolio_entries.php” in the theme directory and delete (or rename) it.

    Cheers!
    Peter

    #209350
    This reply has been marked as private.
    #209365

    Hi Guys,

    I’ve fixed all the problems above, thanks for all your help.

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

The topic ‘How to sort the Category Alphabetically by sort the Portfolio Items by Date?’ is closed to new replies.