// Parallax Defaults
$parallax_defaults = NULL;
-
+ $taxonomy = 'parallax_posts_category';
+ $terms = get_terms($taxonomy);
+ // print_r($terms);
// Pull all the categories into an array
$options_categories = array();
- $options_categories_obj = get_categories();
+ $options_categories_obj = $terms;
$options_categories[''] = 'Select a Category:';
foreach ($options_categories_obj as $category) {
- $options_categories[$category->cat_ID] = $category->cat_name;
+ $options_categories[$category->term_id] = $category->name;
}
// Pull all tags into an array
*
* @package accesspress_parallax
*/
-?>
+?>
<div class="service-listing clearfix">
- <?php
+ <?php
$args = array(
'post_type' => 'glm-parallax',
- 'cat' => 'parallax',
- 'posts_per_page' => -1
+ 'posts_per_page' => -1,
+ 'tax_query' => array(
+ array(
+ 'taxonomy' => 'parallax_posts_category',
+ 'field' => 'term_id',
+ 'terms' => $category
+ )
+ )
);
$count_service = 0;
- $query = new WP_Query($args);
+ $query = new WP_Query($args);
if($query->have_posts()):
$i = 0;
while ($query->have_posts()): $query->the_post();