The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
173 views

Displaying different posts Via wp_list_categories()

I believe this problem to be quite simple but can't seem to get my head around how to solve it. So I'm pulling in all the category with posts in using wp_list_categories(); My problem is when I ...
1
vote
1answer
42 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
votes
1answer
79 views

Replace the post count on wp_list_categories with “Has Posts” instead of number and “No Posts” if none

How can this be achived? Replace the post count on wp_list_categories with "Has Posts" instead of number and "No Posts" if none.
2
votes
1answer
379 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 ...
0
votes
1answer
1k views

Add class to items in wp_list_categories()

I have this in my category.php to show sub-subcategories: <?php if (is_category()) { $this_category = get_category($cat); if (get_category_children($this_category->cat_ID) != "") { echo ...
0
votes
1answer
2k 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
80 views

Exclude a specific category link from archive / front page

I create posts that are used just to create an index item to show an existing post has been updated. The post I create 301 redirects to the updated post. I add these index posts to the category ...
0
votes
1answer
42 views

If searched in a category show different 404 page

Is this possible? I have a searchform that searches for certain categories. If there is no post, it will show me a 404 page... Can I change this page to something else? If so, how do I do that?
0
votes
0answers
28 views

Hiding any option or menu from menubar

Just after logging in through the 'Login' menu when any valid user will reach to the profile page that time the 'Login menu will be hidden in a wordpress theme. That means after logging him/herself in ...
0
votes
1answer
2k 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
21 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
63 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
27 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
107 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
6k 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
157 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
874 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
86 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
165 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
162 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
1k 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 ...
1
vote
1answer
484 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
80 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
826 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
137 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
737 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
325 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
6k views

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

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
473 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
631 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
289 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 ...
2
votes
1answer
322 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
418 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
250 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
341 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
44 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
308 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
1k 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
2k 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
146 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
382 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
633 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
434 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
279 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
2k 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
179 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 ...