Every Post in WordPress is filed under one or more Categories. Categories allow the classification of your Posts into groups and subgroups, thereby aiding viewers in the navigation and use of your site.

learn more… | top users | synonyms (1)

0
votes
2answers
1k views

If a post belongs to two categories how do I choose the main category?

When I assign a post to two categories always one of categories becomes the main category. Is there any way to specify which category out of the two or more is the main category not a secondary ...
0
votes
2answers
115 views

Creating a Blog with numerous categories

I'm creating a health conditions site where contributors will make posts. If I want to have multiple people with the "Author Role" be able to post about various categories, do I have to manually ...
0
votes
1answer
1k views

Wordpress get from single.php back to the right category page

in my single.php i have a link back to the category: $category_id = get_the_category(); $category_link = get_category_link( $category_id[0]->cat_ID ); If i am now coming from page 2 to the ...
0
votes
1answer
3k views

Show all posts in category

I am trying to show all posts in each category. I've been searching around and it seems I need to have either the category slug or term_id to do so, like the code below. <?php ...
0
votes
1answer
172 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 ...
2
votes
2answers
512 views

Are Categories, Tags and Custom Taxonomies any different in regards to SEO?

Simple question, really. I know pretty much nothing about SEO, and i'm trying to define a good structure for this clients online magazine. I already know i'll be using a few custom taxonomies along ...
0
votes
1answer
3k views

Adding category dropdown list to theme options page

I am tyring to add a category drop down list to my theme options page. I am try it this way: <p> Select a style from the list <?php $amp_categories_obj = ...
1
vote
1answer
1k views

Get_Posts and multiple categories

I have created a custom query in hopes of showing the top posts from some child categories. It appears here: http://www.sitesofconscience.org/activities/whats-new The query has a big flaw: some posts ...
1
vote
1answer
163 views

Calendar Solution: Handling upcoming Dates with Posts?

I'm not sure I'm allowed to ask a question like this on this forum, however I'll try. My question is not yet about a technical problem but how my complete theme-architecture might be build to fit my ...
1
vote
2answers
833 views

Wordpress check if user is logged in from non wordpress page

I am using wordpress and I normally use: if (!is_user_logged_in()){ //something here } to detect if the wordpress user is logged in or now. My problem is that I need to detect if the user is ...
0
votes
1answer
3k views

How to get post category title within the loop?

I'm stuck in a rather simple task: to get the category title for the current post, within the loop, to be used in the function (not to be automatically printed). Any ideas?
1
vote
1answer
635 views

Add title, post content, and category like add_post_meta and update_post_meta

How can I update/add a new title, post content, and category to a post with hard PHP code similar to add_post_meta(), update_post_meta()?
1
vote
3answers
6k views

Add Category Taxonomy Support to Custom Post Type

I'm writing some code that makes extensive use of custom post types- and I'm looking for a means of programatically adding a category to a defined custom post type, and then accessing its category ID. ...
-1
votes
1answer
763 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.'"]'; ...
3
votes
1answer
6k views

Group WP_Query by category

OK, here's my setup: Custom post type called "issues" (for a magazine) Posts with custom meta field matching the post ID of the corresponding issue. When I'm on a single "issue" post page, I want to ...
0
votes
2answers
1k views

Exclude category from query

PROBLEM Hey everyone I have the wp loop to display posts, but I need to exclude category 81. I tried: query_posts('cat=-81'); ?> before the loop but the pagenavi is broken and it doesn't work ...
0
votes
1answer
601 views

how to display page title only for child category pages

I apologize if this is a dumb question, but I am just learning PHP and Wordpress. It's probably very simple. I have a site where the top-level nav is all parent categories, with the child categories ...
3
votes
3answers
887 views

How to control which category will be picked for the slug of a post?

I'm using the permalink structure "/%category%/%postname%/". What bothers me is that I have posts that belong to two categories. And of course, unfortunately, Wordpress always picks the wrong one for ...
0
votes
1answer
925 views

add an image field to wordpress category

i am trying to add an image field to the wp_term table in the database, I'll call it icon. I want that filed to contain a URL to an image that will be the thumb for the category. I have already added ...
2
votes
1answer
933 views

show posts names and links in the sidebar list as categories child

i'm using this plugin to show an exapandable/collapsible widget-menu in my sidebar. http://wordpress.org/extend/plugins/folding-category-widget it works very well! the question, not directly ...
4
votes
3answers
6k views

add_action hook for completely new post?

publish_post Runs when a post is published, or if it is edited and its status is "published". Action function arguments: post ID. -Plugin API Documentation I've added the publish_post ...
0
votes
1answer
607 views

How to Check if a Child Category is Being Queried

I need to change the number of posts queried for specific categories 'Recipes' or 'Product Reviews'. The below code works great for this, I have it in functions.php: function ...
3
votes
2answers
445 views

What could be causing my wp_query pagination to break?

I'm using categories and wp_query to create an "advanced search" feature on my website. It was working great until recently I noticed that the pagination was broken. The following 2 links should ...
0
votes
1answer
159 views

Remove the number of posts displayed in wp_list_categories()

When I use wp_list_categories(), it results in the number of posts in a category being shown, how do I hide the number? For example: I have xyz category, it has 3 posts, the result will be: xyz(3)
0
votes
1answer
96 views

wp_insert_link not working

Im using this code to insert links into my blog: $linkdata = array( 'link_name' => $title, 'link_url' => $url, 'link_catetory' => 3, // my cat ...
0
votes
2answers
2k views

How to? Redirect /category/sci-fi/ to /category/scifi/?

I changed the wordpress category slug from "sci-fi" to "scifi" a few months back by accident. How can I redirect /category/sci-fi/ to /category/scifi/ so that /category/sci-fi/page/2/, ...
0
votes
1answer
481 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
795 views

I use same slug name for category and page

I added one slug and page with the same name and they worked fine, but when creating a second WP forced me to rename the page (being created after the category) with an additional "-2" how to clear ...
1
vote
2answers
407 views

Custom post type getting wrong categories and tags

Ok i have a custom post type on my blog called videos, where i only post a video. There's a sceen cap below On the right are the latest post from the custom post type, on the left is the video, ...
0
votes
1answer
461 views

wp_list_pages() not showing on posts

I have the following code showing up a sub-menu on my website (in my header.php file) that shows all well and good, however when I open up a post it dissapears: <div id="dep-menu"> <?php ...
0
votes
1answer
87 views

Exclude the category in Wordpress

My question: This code retrieves the categories. I need to exclude the category number:81. Is there an easy way to exclude it in this code? <?php $cat_lists = retrieve_cat_data_sp( ...
3
votes
2answers
7k views

Multiple level category drop-down

I'm using WordPress as a CMS and would like to have categories selectable from multiple selections i.e <option>. As a usage example, The first dropdown would contain parent categories. Then ...
1
vote
0answers
48 views

Local to testing server now the category gives a page not found? [closed]

With my locally created WP theme i used the wrong category for some posts, so i changed it to another one. Everything worked ok. But on my testing website it gives me a 404 page not found. i just ...
0
votes
1answer
88 views

How to list post as buch of category, and all of them

I like my homepage not to list only one category, but to list all category, group by post. Here is the request : Cat 1 2 3 4 5 and the post will be : post 1 (cat=2) 2(cat=2) 3(cat=1) ...
1
vote
1answer
474 views

wp_parse_args & category parameter

Am trying to use this code: function wp_custom_archive($args = '') { global $wpdb, $wp_locale; $defaults = array( 'cat' => 6, //doing nothing 'format' ...
0
votes
1answer
73 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
181 views

Hide the word 'category' from my permalinks

How can I hide the word 'category' from my permalinks? Regards.
0
votes
1answer
113 views

How can assign posting to Subscriber to specific category?

I'd like to permit posting(writing) to "Subscriber"group to a specific category. How can I do it?
1
vote
2answers
216 views

Is having thousands of unique categories a concern?

I'm in the process of creating a lyrics website using WordPress. Each post consists of a song, and I figured for ease to make each category represent the song artist. With this in mind, the site will ...
0
votes
1answer
131 views

Get post related on category

it's a catalog website for different product. I need a function that will get the category of the selected product, and get all the product from that category Let see an example. A table, is in wood ...
1
vote
1answer
183 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 /* ...
1
vote
1answer
215 views

How do I make the category sidebar widget (stock) display the total # of posts including those in subcategories?

Thanks for taking a look at this for me. You can see the current behavior at http://dev.citylightphilly.com/blog/ -- Here is my specific problem. We are using a category structure like this: Events ...
0
votes
1answer
58 views

Need help with major category and permalink re-organization

I would like to re-organize my categories and the permalink structure. I want to rename and merge categories, make previous categories sub-categories and change the permalink structure from ...
0
votes
1answer
323 views

How do I display something on a particular category page?

How would I display HTML conditional on a particular category page? Say my permalinks to the category pages are http://www.mysite.com/category/awesome-category How would I cast the <?php if ... ...
0
votes
1answer
85 views

Display ONLY Latest Post From Several Categories

I have searched for this solution on here and was not able to find one that worked for me so I apologize if this seems like a redundant question. I have several categories that I want to display ONLY ...
0
votes
1answer
582 views

How to add categories using mysql

I have an excel sheet with 423 categories consisting of US States > Military Bases. Is there a way I can reformat the excel sheet and import the categories into the wordpress database? I know how to ...
1
vote
1answer
1k views

how to query posts and auto assign category if post title has keyword

how can i query posts by current date and auto assign category based on keyword found on post title, something like if title contains 'oranges' auto assign it 'oranges' category maybe something like ...
0
votes
2answers
177 views

separate posts to have (kind of) 2 blogs?

Before putting a lot of effort in this, just to find out it's not possible: Let's say I have two different categories and I want the user to be locked in one of them after choosing it from a ...
1
vote
1answer
246 views

Get Unique Categories - Group By?

I have 2 separate groups of Categories that a post can be classified in: Client & Medium. I'm trying to display all the Clients (if they have posts), and any Mediums that those posts may belong ...
0
votes
1answer
47 views

What's wrong with my wp database query?

$cats = $wpdb->get_results('SELECT term_id, term_taxonomy_id, taxonomy, parent FROM wp_terms, wp_term_taxonomy WHERE term_id = term_taxonomy_id AND parent = 1 AND taxonomy = "category"', ...