How do i change the PHP file so the filters are in a specific order
-
I have my site set up https://cjsukimport.com/?page_id=24 and I need to change the PHP file so that the filters are in a different order than they are now. Does anyone know how to do this?
The current PHP code is:
<p class="portfolio-filters" id="portfolio-filter"> <span>Filters:</span> <a class="button" href="#all">All</a> <!-- Grab just the category slugs and list them using our markup --> <?php if(get_post_custom_values('category_filter')) : // If the category filter exists on this page... $cats = get_post_custom_values('category_filter'); // Returns an array of cat-slugs from the custom field. foreach ( $cats as $cat ) { $catsluglink = '<a class="button" href="#'.$cat.'">'.$cat.'</a> '; // Create a link using our markup now $acats[] = $catsluglink; // Turn the list of ID's into an ARRAY, $acats[] } $cat_string = join(' ', $acats); // Join the ARRAY into a space-separated STRING echo $cat_string; endif; ?> </p>
- The topic ‘How do i change the PHP file so the filters are in a specific order’ is closed to new replies.