The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
2answers
209 views

current_cat_ancestor Alternatives

It looks like adding current-cat-ancestor class to category list was proposed, but never implemented. The only way I've been able to find so far is to re-create the wp_list_categories() function ...
3
votes
1answer
1k views

How can I custom order the results from wp_list_categories?

I am using wp_list_categories to return (you guessed it) a list of categories within a custom taxonomy. The orderby parameter accepts sorting by ID, name, slug, count, and term_group. Is there a way ...
2
votes
1answer
257 views

How to highlight all current categories when viewing a single post?

When viewing a single post, the wp_list_categories function already marks the current category of this particular post by assigning the current-cat CSS class. If the post is mapped to multiple ...
2
votes
2answers
708 views

Add class to Categories Widget

I have a few default widgets which I am using in a custom sidebar and I'd like to edit its output in my functions.php file. Currently the categories widget and blogrolls are generating an unordered ...
2
votes
2answers
3k views

How can I customize the wp_list_categories

I have a list of categories in woo-commerce which I'm trying to customize to be displayed to look like the following image. I created the above image using normal HTML and css however I would like ...
2
votes
1answer
146 views

Manipulate Output of wp_list_something: select menu instead of li's

I'm working on a responsive webdesign where my navigation should swap into a select-menu when resizing the window in smaller sizes. Is it somehow possible to add another param to functions like ...
2
votes
1answer
532 views

Walker gives additional taxonomy name?

I'm a beginner at Wordpress, so I would appreciate it if any of you could nudge me in the right way. Anyway, what irks me is how wp_list_categories (and similar functions) produce a lot of unnecessary ...
1
vote
3answers
694 views

Add Class While on Current Post; wp_list_categories

The code below produces a sub-menu of child categories of the currently active parent category. This code also produces the child categories of the top parent category while viewing child categories ...
1
vote
1answer
269 views

How do I reset this wp_list_categories query?

How do I reset a query that generates a list of categories with wp_list_categories? The query below builds a two column list of categories that is then displayed with the second code chunk. I'm ...
1
vote
1answer
35 views

Arrange Combined List of Pages and Categories

I'm using the code below to display both top-level pages and categories in my menu. (If this is the incorrect way to do so, please let me know). I would like to arrange the items alphabetically. The ...
1
vote
1answer
105 views

Insert <ul> Into Sub-child Menu

This code displays a list of child categories of the parent category while a user is on a child category or single post. The styling around this list is displaying even when a list isn't being ...
1
vote
1answer
652 views

Using wp_list_categories like the the_category (showing just current categories of a post)

fromi'm using wp_list_categories to get an unordered list with headlines (on single.php inside the post-loop): <ul><?php wp_list_categories('title_li=0');?></ul> the thing is: i ...
1
vote
1answer
265 views

Giving wp_list_categories the class of the category

I am using wp_list_categories to list my categories in my menu. When the menu is generated each category is listed as a <li>-element with "cat-item[number]" as class. Is there a way to also or ...
1
vote
1answer
1k views

wp_list_categories() - current-cat class also inside posts?

I wrote my own function to list all taxonomy terms of a certain taxonomy … function wr_list_taxonomy($taxonomy, $orderby, $hierarchical) { $show_count = 0; $pad_counts = 0; $title ...
1
vote
1answer
579 views

Using wp_list_categories to show more than one custom taxonomy

I'm using wp_list_categories like this: $taxonomy = 'colors'; $orderby = 'count'; ...
1
vote
1answer
146 views

Post specific text based on category displayed

So I'm working on a site and I need a news page that is slightly different. It is a post category but I want the text echoed at the top of the news category listing. <?php endif; ?> <?php /* ...
1
vote
1answer
280 views

List Sub-Categories of a Parent Category

I need to be able to list categories that are the sub-category of a specific category that is a sub-category of a primary category. So something like this: Print Categories where ParentCategory = ...
1
vote
1answer
35 views

List of Posts and Categories

I have a custom taxonomy of Species and a custom post type of Animals. I would like to display them in a tree view like so: All Animals Fish (taxonomy term) Shark (Custom Post Type) Sun Fish ...
1
vote
1answer
16 views

How to display all the categories a post is in

How do I display all of the categories that a post is in, in sentence format. eg. cars, boats, aircraft, bicycles.
1
vote
1answer
243 views

Changing post category from dropdown

I am showing a list of posts on the front of my wordpress site which each have a dropdown next to them with a list of category's, which are pulled in as follows. As you can see the form submit button ...
1
vote
1answer
41 views

Order categories by most posts

How can I list the categories by most posts News(100) Updates(45) Alerts(20) and so on
1
vote
1answer
261 views

List Taxonomies: Don't list taxonomy if it has no post - depending on custom post-meta?

This might be complicated to explain and I don't know if there is a solution to that!? I have a custom-post-type named "wr_event" and a hierarchical custom-taxonomy named "event_type". The ...
0
votes
2answers
111 views

Categorie parents and childs displayed

I'm trying to create a menu directly hard-coded, basically I need to display the parent category and below its child categories, however I have to do this several times meaning something like this: ...
0
votes
1answer
261 views

Give child-categories same class (the parent category-slug) as parent in menu list?

I am trying to do two things, which I have no idea how to do: give child categories the same class as the parent category (which is the parent category-slug) create a menu which displays my ...
0
votes
1answer
1k views

Add filter to wp_dropdown_pages() or wp_dropdown_categories() - no select container?

I'm working with wp_dropdown_pages() and wp_dropdown_categories() and both are always outputting a <select>-box with its <option>s as items. Is it possible to add a filter/hook to this ...
0
votes
2answers
49 views

Post Image not displaying in category view

I tried adding an thumbnail sized image in the very first line of the post so that I want my category list search should display with this thumbnail and some text with "read more" button but this ...
0
votes
2answers
110 views

Targeting categories in custom fields

I was hoping somebody could help me out with custom fields. I created a custom post type called game-type in WordPress. In this I have the categories "Android", "iOS" and "PC", then within these I ...
0
votes
3answers
3k views

Woocommerce Product Category Widget - hide categories that have no products in stock

I'm using WooCommerce on my Wordpress site, and have a widget in the sidebar showing all product categories. It's setup to hide empty categories, and that works well. However, it still shows ...
0
votes
1answer
1k views

How can I make wp_list_categories output li with category-slug as class, for its children?

Simply put, I'd like to change the wp_list_categories output from this: <li class="cat-item cat-item-1"><a href="http://mysite.com/category/articles">Articles</a></li> ...
0
votes
1answer
317 views

get_the_category_list() does not give me all my categories

I am trying to use <?php echo get_the_category_list(); ?> in my footer.php file to display my categories. On the home page, this function is showing only two categories and in inner single posts ...
0
votes
3answers
751 views

How to hide child categories from displaying

I am using this code to show a list of all categories in sidebar <?php wp_list_cats('list=0&sort_column=name&optioncount=0&hierarchical=0&optioncount=1&children=0'); ?> ...
0
votes
1answer
339 views

Proper WP conditional tag to check for existing taxonomies to list out terms with wp_list_categories?

This is what I currently have but its not rendering any results... It was the closest conditional I could think of using to match what Im trying to output but it didnt seem to work. Any ideas?... ...
0
votes
1answer
744 views

get_category_link() is returning nothing

<?php $categories=get_categories('taxonomy=galeriak'); foreach ($categories as $category) { ?> <li><a href="<?php echo get_category_link( $category->term_id ) ?>" ...
0
votes
1answer
82 views

Get categories list with category name in custom WP_List_Table class

Im building a plugin and i made custom wp_list_table class to suit my needs and display items with native wordpress look. The problem is that i can't get to list categories with categories names. I ...
0
votes
1answer
71 views

Modification to wp_list_categories

I dug this up to help me modify wp_list_categories and place the featured image from the latest post in that category, inside the generated li. class CategoryThumbnail_Walker extends Walker_Category ...
0
votes
1answer
604 views

Adding ul class with wp_list_categories Custom Walker

I am trying to achieve something that seems like it should be simple but is causing me headaches. I am listing my categories out using wp_list_categories which gives me this... <ul> ...
0
votes
1answer
647 views

Get category ID from category slug (not working)

I found this code, which apparently gets the category ID from the category slug: $category = get_category_by_slug('category-name'); $id = $category->term_id; But when I try to implement it ...
0
votes
1answer
239 views

Category count inside the link

Is it possible using wp_list_categories set count of post in category in the href?
0
votes
1answer
67 views

Retrieve Custom Taxonomies with Description and Slug

I've been looking to grab a list of custom taxonomies for a custom post type with the titles, descriptions and tag but have not been able to progress or find anything helpful. Breakdown: I have ...
0
votes
1answer
125 views

Adding wp_list_categories to a specific div that was appended using jQuery

Due to the way my projects menu is coded/styled I'm having some difficulty figuring this out. I have appended a div to my menu using jQuery, and I want to be able to include an external php file that ...
0
votes
1answer
466 views

How to list only child categories?

Is there any way to list the child categories only? I just want to filter the Parent Categories
0
votes
2answers
125 views

how do you prevent showing a particular category on the admin dashboard for specific user roles?

I'd like to prevent the "Featured" category from appearing for certain user roles. To be specific, I want only the admins and editors to be able to see and thus select or unselect that category. ...
0
votes
1answer
1k views

wp_list_categories pagination

I was wondering if I can paginate wp_list_categories? I had a go with paginate_links but no luck. Or is there a good workaround? Thank you!! <?php $orderby = 'name'; $show_count = 0; ...
0
votes
1answer
980 views

add filter to wp_list_categories and query if used to list tax-terms?

this is probably a confusing title of my question, but it's exactly what's describing my problem best. I want to add the category-slug as classname to my wp_list_categories() output. I found a really ...
0
votes
1answer
337 views

wp_list_categories with show_count, except for specific categories

I want to show post count for all child categories shown, but not for their parent categories. Or, since there are only 3 parent categories, this exclusion could be per category id. Is there a way ...
0
votes
2answers
774 views

wp_list_categories() Exclude All Categories Except One

Is there a way to exclude all categories except one? I want to show a category and it's sub-categories as a dropdown menu, but the admin might add more subcategories to it so I don't want to limit ...
0
votes
1answer
61 views

Not showing list if there aren't any categories to display

maybe you can help: Bellow there is a simple code listing my blogs categories. I need some code that will not display the *ul is there aren't any categories to display* <ul> ...
0
votes
1answer
861 views

How to divide and display categories into two columns

I am using custom taxonomies. I have multiple categories and each category has multiple children. I would like to display the categories in two columns on my homepage similar to linkcentre.com. I ...
0
votes
2answers
293 views

Wordpress Categories: Function using custom SQL to return array of specific category IDs

I'm developing a custom theme which uses categories for positioning, all of which begin with an underscore (e.g. _position1). I have an SQL query as below to get a list of these categories (those ...
0
votes
0answers
15 views

Loop spesific category title + Foundation reveal

I would like to make a list of a spesific post category title. In this list I want the reveal function from Foundation to open the post + its title. How do I make this? I'm kinda new to making loops ...