How-to get the get_category_parents() breadcrumbs trail without link on last item

I wouldn’t consider this any better/worse than Kaiser’s option, but just different. Why not use get_category_parents on the parent category and then (optionally) append the current category? I haven’t tested this, but something like the following should work: $cat_id=7;//current category’s ID (e.g. 7) $separator=”»”;//The separator to use $category = get_category($cat_id);//$category is the current category object … Read more

Search form with Category and Sub Category

First you have to give your dropdown names so: <?php $media = array( ‘name’ => ‘subcat’, ‘hierarchical’ => 1, ‘parent’ => get_cat_id(‘Media’), ‘show_option_none’ => (‘All Media’), ‘hide_empty’ => 0 ); ?> <form method=”get” id=”searchform” action=”<?php bloginfo(‘url’); ?>/”> <div> <input type=”text” value=”<?php the_search_query(); ?>” name=”s” id=”s” /> <?php wp_dropdown_categories(‘name=maincat&show_option_none=All Category’); ?> <?php wp_dropdown_categories($media); ?> <input type=”hidden” … Read more

How to splice in wp_links links into the loop?

I’ve tried something similar to that (well, slightly different, what I did was try to create a timeline where posts and comments showed up in the same timeline)… Merging those two arrays is not easy, because the post object has completely different properties to the link object. If you wanted to do it, you’d have … Read more