The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
1k views

How to make a drop down menu with categories

I'm building a website in which there is a navigation menu with various links; in this menu there is the link to the blog section. My goal is to create a drop down menu that appears when the cursor ...
1
vote
1answer
20 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.
0
votes
1answer
51 views

Display Taxonomy Terms in an option tag with value being the slug

I have a custom taxonomy filled with terms that I wish to display in a fashion such as below. <option value="[SLUG]">[TERM]</option> <option value="[SLUG]">[TERM]</option> ...
0
votes
0answers
24 views

How Can I List Categories by Date?

This question isn't specifically about categories, but any taxonomy. I registered a taxonomy called issue. I want to list these issues by year. I'm currently using the function: wp_list_categories( ...
0
votes
1answer
91 views

Delete Term via edit-tags.php

I might get rep'ed down on this - but is there suppose to be a "Delete" link on the edit-tags.php page? Note: not the WP-List-Table, but the actual page where you specifically view the terms ...
2
votes
2answers
4k 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 ...
1
vote
1answer
129 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
3answers
774 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 ...
0
votes
0answers
79 views

Display a custom post type list by taxonomy term

I need to show a list of custom post type classified by terms. The idea is something like this: Service list: <ul> <li> <a href="#">Webdesign (taxonomy term)</a> ...
-2
votes
1answer
146 views

Make this jQuery toggle snippet target each list item individually [closed]

I'm currently using this little jQuery toggle snippet to show/hide child categories using the wp_list_categories function; $('.sidebar ul.children').hide(); // Start by hiding child categories ...
0
votes
0answers
142 views

wp_list_categories not working on my live site

I am using wp_list_categories function it work on local server fine but on the live site its not working the code i am using for this is <li class="dropdown"><a href="#" ...
0
votes
1answer
832 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
338 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
74 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 ...
1
vote
1answer
734 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 ...
0
votes
2answers
111 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
1answer
130 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
607 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
1answer
274 views

How can i list current author's categories?

My Code getting authors written post categories but just 2 ID has author lists category.. I replace $current_user->ID but it is not worked. <?php $categories = $wpdb->get_results(" ...
1
vote
3answers
5k 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
429 views

Show last post from multiple categories using wp_list_categories

I have the following code that lists out the children categories on a separate page when you click on its parent category. The code renders a list like so: Home › Archive for IQ Issue 7 Journal ...
2
votes
1answer
573 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 ...
0
votes
1answer
278 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 ...
1
vote
1answer
281 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 ...
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
364 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 ...
4
votes
2answers
230 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 ...
1
vote
1answer
305 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
43 views

Order categories by most posts

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

assign the returned value of wordpress function to a variable?

Why can't I store wp_list_categories in a variable? $wplist = wp_list_categories( array ( 'taxonomy' => 'ntp_package_type', ...
0
votes
3answers
862 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'); ?> ...
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 ...
0
votes
2answers
131 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. ...
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 ...
0
votes
1answer
355 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
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
577 views

Listing Specific Categories from Current Post with Depth

I've been on this for sometime and been having a ton of issues to find a proper way to do what I'm trying to achieve. An Example would be as follows: I have a featured Image with a rollover and I ...
0
votes
1answer
432 views

Displaying Custom Taxonomy List Posts By Slug?

Is it possible to list the posts from a custom taxonomy by slug along? This link kind of does it but i want to target the slugs rather than just the whole taxonomy itself ...
1
vote
1answer
267 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
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 ...
2
votes
1answer
162 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 ...
-1
votes
1answer
509 views

wp_list_categories() not listing categories

I've many categories in my database but when i'm calling wp_list_categories() it is not listing any categories, its only outputting Categories No categories Also, I'm trying to populate it using ...
0
votes
1answer
1k 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 ...
-1
votes
1answer
541 views

how to set category name for a post

how to set category name for post: this is my code ,this is not working ,why? $post_title = $vname; $categ='category name'; $post_content = '[newpage link="'.$videos.'"]'; ...
1
vote
1answer
633 views

Using wp_list_categories to show more than one custom taxonomy

I'm using wp_list_categories like this: $taxonomy = 'colors'; $orderby = 'count'; ...
0
votes
1answer
388 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
1answer
124 views

How to Insert A List of Posts in A Category Written by the Author into the Author Archive

What I want: http://i.imgur.com/jH6Dj.png (sorry for linking out, I am a new user here so can't post an image inline) How does one list posts by an author within a category, with a count for each ...
1
vote
1answer
158 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 /* ...
0
votes
2answers
844 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 ...
2
votes
2answers
781 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 ...