wp_list_categories set order manually?
I would use get_categories() to first get an associative array of all the categories and then sort it how you want it. $categories = get_categories(‘include=16,17,15’);
I would use get_categories() to first get an associative array of all the categories and then sort it how you want it. $categories = get_categories(‘include=16,17,15’);
There is no need to create a custom taxonomy or custom template. When we click on any category then wordpress by default called archive.php file which has code for display posts related to that particular category. So first use this code in any of your php template file to display category lists: <?php $args = … Read more
Found a solution: <?php $cat = get_the_category(); $category_id = $cat[0]->term_id; foreach (get_the_category() as $cat) : $attachmentId = get_option(“category_image_{$category_id}”, ‘null’); $imageArr = wp_get_attachment_image_src( $attachmentId, ‘medium’ ); $imageURL = $imageArr[0]; echo ‘<img src=”‘ . $imageURL . ‘” />’; endforeach; ?>
You should simply be able to add another foreach loop, using the get_term_children() function. Change your lines: foreach( $tags as $tag ) { $name = apply_filters( ‘the_title’, $tag->name ); $list .= ‘<li><a href=”‘ . get_term_link( $tag ) . ‘” title=”‘ . sprintf(__(‘View all posts tagged with %s’, ”), $tag->name) . ‘”>’ . $tag->name . ‘ … Read more
Filtering *out* a taxonomy from the admin post list
ok I found a solution. Let me know if I can incur into troubles doing this. basically we add the category to the url link programmatically. on page request we check if the url begin with a category/subcategory name. if so we prepend just for this request the %category% section to the permalink structure. Nice … Read more
Create menu / submenu from category subcategory and posts
You need to modify the rewrite argument when you register your post type: $args = array( // […] ‘rewrite’ => array( ‘slug’ => “Tours” ), ); register_post_type( mc_tours, $args );
Display Posts Loop for each parent and for each Child
Menus don’t work after 4.4 [closed]