Returns an array of category objects matching the query parameters. Arguments are pretty much the same as wp_list_categories and can be passed as either array or in query syntax.

learn more… | top users | synonyms

0
votes
1answer
596 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
200 views

Indenting Category list

I am using the get_categories() function combined with a foreach loop, to create a list of all the catgorys in a form. like so: $args = array( 'type' => 'post', ...
5
votes
2answers
856 views

get_terms vs. get_categories: does it matter?

I'm fairly new to wordpress and am coming across new things each day - one was today when I happened across get_terms and noticed that it was basically the same as get_category. Any particular ...
0
votes
2answers
703 views

Exclude category from category archive

I've included the code I'm working with below. I had some custom work done on a wordpress site of mine. This is a page that shows an list of the categories along with images and a short description. ...
1
vote
1answer
1k views

How to make multiple sections in home pulling posts category wise?

This question may look foolish to everyone or novice , but i am working on a theme . It will be basically a news publishing theme . Right now , In my home page all posts are showing one after ...
0
votes
1answer
2k views

Query only Posts from Both of Two Category?

I have 3 categories, 1.OnGoing projects(cat id='5') 2.Completed Projects(cat id='6') 3.Upcoming Projects(cat id='7') and also i have another 2 categories:(Not a Sub Category) chennai (cat ...
0
votes
1answer
160 views

Define specific category name in PHP

Might be a really simple question... I am trying to pull out a category name in PHP and display it on my page. I have multiple category sections on this page, and each need to pull their respected ...
0
votes
1answer
1k views

Category 'pad_counts' & 'parent' conflict

Below is the current loop I have setup: <?php //start products category loop $args = array( 'hide_empty' => 0, 'parent' => 0, ...
-1
votes
1answer
575 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.'"]'; ...
0
votes
1answer
33 views

get IDs from links categories

How can I get the IDs of all my links categories? I'm writting a plugin to bookmark more easy using wp_insert_link() function. Any ideas?
0
votes
1answer
65 views

Getting categories to change appropriately when using $cat = ' ';

The code below is based on a couple of forum posts from a couple of places. To a certain extent, it works. The issue I am having is that it only shows "Activities", no matter what parent category I'm ...
0
votes
1answer
375 views

List of categories instead of dropdown menu selector in admin options

I am using the following code for in admin area for theme options $categories = get_categories('hide_empty=0&orderby=name'); $tz_wp_cats = array(); foreach ($categories as $category_list ...
1
vote
1answer
240 views

List all categories in options

I used to use the following code to make the list of all categories: foreach($categories as $cat) { print '<label>'.$cat->name.'</label>'; print '<input type="text" ...
1
vote
1answer
233 views

Category Foreach keeps looping?

I'm using the following code to acquire all the child categories of a category and displaying the child posts of the child categories. <?php $cats = get_categories( 'child_of='.get_query_var( ...
1
vote
0answers
274 views

Why is my 'list_terms_exclusions' filter function timing out? [closed]

Why is my function timing out? When the issue was first noticed I added wp_defer_term_counting('true') to delay that process but to no avail. /* Filter category from get_categories and ...
3
votes
2answers
6k views

get_categories hierarchical order like wp_list_categories - with name, slug & link to edit cat

I need to find a way to list all categories - empty or not - in a hierarchial list - like wp_list_categories - also showing the slug, cat name and a link to edit in the admin. Here is what I have so ...
0
votes
2answers
2k views

How to exclude categories from get_categories() select list inside a widget admin panel

I have a widget that I need to add a category select list to. The end user should be able to select a category and I need to save the category ID with the widget. I've hit a stumbling block in that I ...
0
votes
1answer
1k views

pages meta box - get_categories dropdown

I created a meta box with a dropdown list which consists of all existing categories. The administrator of the page should be able to choose one of the categories out of the dropdown list which will ...
0
votes
2answers
123 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: ...
1
vote
1answer
294 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 = ...
0
votes
2answers
649 views

Code that displays images - images get shown multiple times

On My category.php page i've got a list of categories with the title and the description. Here's the code: <?php $cat_id = get_query_var('cat'); $catlist = ...
1
vote
1answer
1k 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
2answers
719 views

Help with a get_categories () drop down menu - I want it to show in heirachial form

I have a drop down menu that displays all of the terms for one of my custom taxonomies using get_categories (). It displays fine in alphabetical form. However, what i want to know is how can i have ...
0
votes
1answer
161 views

echo site_url() returns a different value than what is in the database siteurl field

I have just copied a WordPress site to a different domain, everything on the front-end and admin side displays and works smoothly except I found my category links are linking to the old site domain. ( ...
0
votes
1answer
227 views

List Categories By Specified First Character

I'm trying to get category list by specified first character. For example if specified character query is "A", then just wanna list categories start with "A". How is it possible?
1
vote
2answers
1k views

wp_list_categories: get latest featured_image of category

I was thinking about a nicer way to display the categories in my sidebar. Instead of a plain list style, I'd like to have images / thumbnails show up as well. Currently I'm using the following: ...
0
votes
1answer
74 views

Creating links to a page displaying posts from a particular category

Ok so at the moment I have a page which displays a list of categories within my Taxonomy (event-themes), here's the code: <div id="themeSearch"> <h1 class="mainSectionHeader">By ...
0
votes
2answers
2k views

get_query_var() and permalinks

I have a permalink structure that looks like this, %category%/%postname% I have a category.php template coded up and and trying to pull of the post of a certain category, so for example my URL may ...
0
votes
1answer
133 views

Printing out Main Category ID's in a Loop

I'm looking to print out All of the Main Categories (So Exclude Sub-Categories) in a Loop, I need to get the ID's to do some advanced category listings. So I need to echo this out: 3 CatName 4 ...