Articles of categories

How to view WordPress' default category IDs?

It seems that WordPress has default categories with default (and unchangeable) IDs. For example, the uncategorized category seems to always have an id of 1. Is this always the case? Is there any official documentation for this (and other default category IDs)? Question (big picture) How to view a list of these default categories and […]

Wrap a chosen category name with div

I’m trying to wrap a category name in a post with a div. This is how i get the category name I need. Reference Links : get_term_by term_exists My Ideas <?php $term = term_exists(‘foo’, ‘category’); ?> <?php $term = get_term_by(‘name’, ‘foo’, ‘category’) ?> I need to wrap $term in a div. But I still can’t […]

In what context should Categories and Tags be used

I was thinking on writing up a post called “Review: Ni no Kuni” which would be a personal review on the title game having finished it. Under categories i could make a “Reviews” Category to group all the reviews (weather they be Anime, Games etc.) and a “Games” Category to group all the posts related […]

Remove Category from Menu link

I am new to word press and want to remove category from menu link. Example: When i click Entertainment page redirect to I want to remove category from above link.The link should be As I am new to word press,i don’t know how can i achieve.

Deleting a category from WordPress admin does it remove it completely from the database?

When you delete a category in the admin of WordPress does it completely remove it from the database? I had a few categories with the same naming conventions (different slugs) but now deleting any categories having the same names and creating a complete new category but I wanted to make sure the old categories is […]

Related Posts Excluding Certain Categories

I’m using a related posts PHP WordPress query, but having trouble excluding categories. I’ve tried excluding via cat and category__not_in as well as both as and not as an array. What am I setting up incorrectly? <?php $orig_post = $post; global $post; $categories = get_the_category($post->ID); if ($categories) { $category_ids = array(); foreach($categories as $individual_category) $category_ids[] […]

Mark menu item as current-menu-item for category

I have some categories on my WP website. When users sees this categories and posts from them i want to mark one of menu items as active. How can i set one of my menu items to have class “current-menu-item” for this categories and posts?

How can I have different content for different countries?

My company has always served the Australian market, but we are now also working in the US. How can I have a US version of the site with some different pages/content, without having multiple installations of wordpress? Although some content will need to be different, a lot will remain the same. I don’t need the […]

Need to echo category id in multi-dimensional array

I have custom post types and categories created with the Types plugin. I have category images allowed/created with the Categories Images plugin. I have a loop that displays the posts of a category in <li>s. Each <li> has a background style property that needs to get the image assigned to that category. This is my […]

Getting the permalink to the latest post from a category

What’s the best way to get the permalink to the latest post of a chosen category? I have a page that I want to have several links to the latest post from different specified categories. Simple question, but I’m not sure if it’s even possible 🙂 Thanks!