Okay
  Public Ticket #211728
Sorting Portfolios
Closed

Comments

  • leah started the conversation

    Picking up where ticket  #126586 left off....I am trying to achieve the same effect where our Horizontal Portfolio Categories sort via the slug ie. adding 1, 2, 3 as the first character in the slug and not alphabetical by name. I have successfully located the area in the shortcode-processing.php where the mod takes place but because I am lacking knowledge specific to php I have not had much success.

    if( $enable_sortable == \'true\' && $horizontal_filters == \'true\') { ?>
    		<div id="<?php echo $filters_id;?>" class="full-width-section <?php if($span_num != \'elastic-portfolio-item\') echo \'non-fw\'; ?>">
    			<div class="container">
    				<span id="current-category"><?php echo __(\'\', NECTAR_THEME_NAME); ?></span>
    				<ul>
    				   <li id="sort-label"><?php echo (!empty($options[\'portfolio-sortable-text\'])) ? $options[\'portfolio-sortable-text\'] : __(\'Sort Portfolio\',NECTAR_THEME_NAME); ?>:</li>
    				   <li><a href="#" data-filter="*"><?php echo __(\'\', NECTAR_THEME_NAME); ?></a></li>
                   	   <?php wp_list_categories(array(\'title_li\' => \'\', \'taxonomy\' => \'project-type\', \'show_option_none\'   => \'\', \'walker\' => new Walker_Portfolio_Filter())); ?>
    				</ul>
    				<div class="clear"></div>
    			</div>
    		</div>
    	<?php } else if($enable_sortable == \'true\' && $horizontal_filters != \'true\') { ?>
    		<div id="<?php echo $filters_id;?>">
    			<a href="#" data-sortable-label="<?php echo (!empty($options[\'portfolio-sortable-text\'])) ? $options[\'portfolio-sortable-text\'] :\'Sort Portfolio\'; ?>" id="sort-portfolio"><span><?php echo (!empty($options[\'portfolio-sortable-text\'])) ? $options[\'portfolio-sortable-text\'] : __(\'Sort Portfolio\',NECTAR_THEME_NAME); ?></span> <i class="icon-angle-down"></i></a> 
    			<ul>
    			   <li><a href="#" data-filter="*"><?php echo __(\'\', NECTAR_THEME_NAME); ?></a></li>
               	   <?php wp_list_categories(array(\'title_li\' => \'\', \'taxonomy\' => \'project-type\', \'show_option_none\'   => \'\', \'walker\' => new Walker_Portfolio_Filter())); ?>
    <br>
    

    From this code, where would I insert the the mod to make my horizontal sortable categories rearrange via the slug? I can also rearrange by grouporder if that mod is simpler.

    Again I appreciate your help. Your theme is beautiful and has worked wonders for us.

  •  1,070
    ThemeNectar replied

    Hey Leah, sorry for the delay!

    Change the

    http://pastebin.com/em8rMcVx
    
    to
     http://pastebin.com/7RpzaXuD
    

    Cheers :)


  • leah replied

    Worked like a charm! Thanks!