Custom category link in wp_list_categories()

Okay, I’ve found the answer. This is not possible. So I had to build the permalink manually this way: <ul class=”list-items categories”> <?php $category_ids = get_all_category_ids(); $args = array( ‘orderby’ => ‘slug’, ‘parent’ => 0 ); $categories = get_categories( $args ); foreach ( $categories as $category ) { echo ‘<li><a href=”‘ . $category->slug . ‘” …

Read more

Remove Categories and Tags from Admin Dashboard

Just like @fatwombat suggested you need to rewrite the table. If you can’t modify the @Milo solution, here is a snippet that will remove the columns: function my_manage_columns( $columns ) { unset($columns[‘categories’], $columns[‘tags’]); return $columns; } function my_column_init() { add_filter( ‘manage_posts_columns’ , ‘my_manage_columns’ ); } add_action( ‘admin_init’ , ‘my_column_init’ );

Alphabetizing Posts in a Category Page?

As I have stated, never ever use query_posts. The page you have linked to in the codex is worth nothing and completely wrong. For extra info on why not to use query_posts, check my answer here and the answer by @Rarst. You have another issue here, category_name does not accept the category name as value, …

Read more

Filtering search results

You may need to include a tax_query for the Woocommerce taxonomy (called ‘product_cat’): $tax_query = array( array( ‘taxonomy’ => ‘product_cat’ ), ); $query->set( ‘tax_query’, $tax_query ); } return $query; } However, you’ll have to ensure that you can return posts AND pages AND product categories and also note the search results will be mixed up …

Read more

Using separator with wp_list_categories

It looks like the default of the style input parameter is list. Try something like: ‘separator’ => ‘&middot;’, ‘style’ => ‘separator’, // something else than ‘list’ to override the list default. We can see why this happens by peeking into the Walker_Category::start_el() method. There we have the following: if ( ‘list’ == $args[‘style’] ) { …

Read more

Marking old posts as no longer relevant

Your gut feeling that option 2 would be more flexible is correct. Thankfully, Option 3 didn’t occur to you ( using post meta ), but Option 3 has a concerning caveat re: performance, so go with option 2 Then I thought actually, it would be more flexible to create a new category to which old …

Read more