Articles of categories

Check is category parent or not from its ID

question is simple (i don’t know is aswer too 😉 I just want to check that, does a category has child (or is ancestor) from its cat-id with a function. Eg. function check_category ($catid){……………//true if is ancestor, false if notreturn $result;} Note: I can only pass cat-id parameter for function because i need to use […]

Post belonging to many categories

I have a post that belongs to two categories (Drinks, Food). The post appears on category pages under /category/drinks and /category/food When I click on the post under category archive /category/drinks it takes me to a post page that’s in /food/ Is there any way to solve this in a way that the post stays […]

Exclude a category name using cat name

I’m trying to exclude a category because I have a post that i have in multiple post. How do I like for example I have a post in the categories lastest news and pictures but I want to exclude latest news and show only the pictures name. I tried using $category = get_the_category(); echo $category[0]->cat_name; […]

echo category description in single.php

i asked this on SO but got no where. i will try asking here. this works fine in category.php <?php echo category_description(the_category_id()); ?> but it does not work in single.php, just the category id shows up not the description. any ideas, how to get this done? thanks in advance Edit: in category: <?php echo strip_tags(category_description(4)); […]

List Child Categorie and hide the parent

Greetings! I’m trying to list child categories in a sidebar, but also hide the parent cat. I’m using this at the moment: <?php wp_list_categories(‘orderby=id&show_count=0&use_desc_for_title=0&child_of=5′); ?> This has a unfortunate effect of displaying ‘Categories’ above the list. Is there any way to get rid of this? Thanks

Categories will only display links to posts

Hey I’m currently using the Titan theme for my website and I want each category to display each FULL posts for that particular category, but with my theme Titan this is not a option. I only get links for my categories. I don’t know what pages and code to edit to change this. Right now […]

WP Query results showing posts outside of category ID

I have a custom post type called ‘rooms’ and I have categories assigned to specific rooms so they will order on the page in a specific way. The category IDs are 8, 9, and 10. When I pull the below WP Query for a specific category, all of the rooms show up regardless of the […]

With wp_list_category put every existing category into an option tag

Like the title says, I’m using wp_list_categories to get all of the existing categories of my website listed. I would like to achieve this: <select class=”filters-select”> <option value=”.category1″>category1</option> <option value=”.category2″>category2</option> <option value=”.category3″>category3</option> … </select> I’m not sure how the code has to be to achieve that structure, so far I have this which it’s not […]

Having problems with paging

My category.php lists articles on the first page, and on the bottom I have a pager. When I click page 2, the index.php page is loaded and the url looks like this: http:// Why isn’t category.php page loaded when URL has /page/2/ ? My permalink structure looks like this: /%category%/%postname%/ If it helps to […]

Can you have a single set of “canonical” categories shared by all blogs?

When a site gets to a certain scale, storing categories on a per-blog basis starts to get a little messy. Assuming someone would want all WPMU blogs to share a single set of categories, how might one go about that? My gut it so store a set of “cannonical” categories in the root blog. Is […]