term_id; $posts = query_posts('cat=' . $cat_id, ARRAY_A); if ( have_posts() ): while (have_posts()) : the_post(); $posts['thumb'] = the_post_thumbnail('large'); endwhile; endif; return $posts; } function getPostBySlug($post_slug) { global $post, $more; $posts = new WP_Query('name=' . $post_slug); if($posts->have_posts()) : while ($posts->have_posts()) { $posts->the_post(); return $post->post_name; } endif; } /*Categories*/ function getAllCategories() { return get_categories(); } function getCategoryID($cat_name) { $cat = get_term_by('name', $cat_name, 'category'); return $cat->term_id; } /*Tags*/ function getAllTags() { return get_tags(); } function getPostsByTag($tag) { return query_posts('tag=' . $tag->slug); } function related_posts($id){ if (!empty($id) && is_numeric($id)) : $related = get_post_meta($id, 'related_posts', true); if (!empty($related)) : $rel = array(); foreach ($related as $r) : $p = get_post($r); $rel[] = $p; endforeach; // If value should be returned as array, return it if ($return) : return $rel; // Otherwise return a formatted list else : $list = ''; return $list; endif; else : return ""; endif; else : return ""; endif; } }
Fatal error: Class 'Wp_model' not found in /var/www/html/dynopia.com/public_html/system/libraries/Loader.php on line 184