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
1answer
68 views

Are term_taxonomy_id and term_id the same?

I have a custom query where I need a JOIN because I want to COUNT all the posts of a specific category. So I checked the tables and I found out that table wp_term_relationships contains a reference ...
0
votes
1answer
117 views

Set Current Category to Active in category.php

Inside the category.php file I have a custom navbar which is... <ul class = "nav nav-tabs nav-justified"> <li><a href="http://example.com/blog/" title="View all ...
0
votes
1answer
99 views

How can I add a Categories page link to a menu? [closed]

Not a link to a specific category, but a link to a page that lists all categories of a custom post type (WooCommerce Products).
0
votes
0answers
64 views

custom post type, single category page and search form

i have created a custom post type called directory, on my directory page which lists my directories i have a sidebar which shows the categories and how many are in a category but when i click one of ...
0
votes
1answer
40 views

List Posts By Custom Taxonomy

Apologies if this is a stupid question, I've had a google and a look on the site but can't find an answer to my question. I'm working on a project and have created a custom post type called 'books'. ...
0
votes
0answers
32 views

Folder structue same as WordPress categories URLs?

Is it possible to have folders on disk same as categories URLs? For example I have folder on disk "images" and subfolders images/subfolder-one/subfolder-two images/some-folder/ I use "images" as ...
0
votes
1answer
60 views

Changing Permalinks for Category Pages Only

I am working to redesign a site and would like to rework the permalink structure for the category pages only. Right now they are using: /category/category-name I would like to switch this to: ...
0
votes
0answers
40 views

wp_kses enable HTML comment code.filter

Is there a way to enable the category description to allow HTML comment EX: <!-- example of the HTML comment --> How it looks in the category description. <!-- This story is about the ...
0
votes
1answer
37 views

Assign parent category to all posts that are already assigned to child category

All my website's posts are assigned to subcategories, but not to their parent categories too: Is there someway that I could massively assign posts to their parent categories too? My website has ...
1
vote
1answer
141 views

How to exclude uncategorized from permalink structure /%category%/%postname%/

I'm using a custom permalink structure: /%category%/%postname%/ So that my posts are listed like: mysite.com/widgets/blue-widget This works fine as long as "blue-widget" exists in one and only ...
0
votes
0answers
9 views

Is it possible to add categories to new blogs on Wordpress MU?

I have setup WP MU and I need new blogs to have two additional categories when they're created. Is there a way to do this?
0
votes
2answers
406 views

wp_update_nav_menu_item() to insert categories

In the script below, I'm attempting to dynamically add categories to a custom menu. Everything works great, except for the fact that the categories do not have hyperlinks. What am I missing in ...
0
votes
2answers
117 views

Structuring a product catalogue in Wordpress [closed]

I am trying to create a product based content managed website in Wordpress (by clients request). I have created a custom post type where all the products reside, aptly named 'Products'. The products ...
0
votes
3answers
818 views

How to get posts from two categories with WP_Query?

I'm using WP_Query to create 'latest posts' & 'popular posts' sections on my home page. I'm trying to just pull 5 posts from 2 categories (9 & 11) but it will only show posts from cat 9. ...
3
votes
1answer
144 views

Getting Position of a post in a category

I have one post id x, one category id y. I want to retrieve the position at which the post will appear in the category. It is confirmed that the post is from the category Post order will be based on ...
0
votes
1answer
60 views

Display all sub category but one

How would I display all the sub category but one? I tried is_category('myslug') then return in the post loop but it wont work. my code in the post loop if(is_category('myslug')){ return; } ...
0
votes
1answer
44 views

Getting parent category hierarchy as objects from category template

What is the best way to get the hierarchy of parent category objects from the category.php template, when there is no post as such. The function get_category_parents() returns a string not the ...
0
votes
1answer
57 views

Display all post types together

I'm looking to use Custom Post Types to create a simplified process for key individuals to add information to a webpage. Let's use a Job Posting as an example, with custom fields for Job Title, ...
0
votes
2answers
87 views

WP_Query of Category Not Showing First Post

I have the following loop, and only this loop, in my home.php file (apologies if I didn't paste the code properly). I have populated lorem ipsum posts, and noticed that of the five posts only four ...
0
votes
1answer
57 views

How to use categories in the URL with Advanced Custom Fields?

Using the Advanced custom fields plugin: 1) I want to post to the ACF and use a category just like a regular blog post, but the URL would be: mysite.com/customPost/category/post-name Is this ...
0
votes
1answer
69 views

get category name in admin screen

I want to get the name of the category that I am editing posts in. So I have this code that I found here function add_custom_submenus() { global $submenu, $post; $submenu['edit.php'][] = array( ...
0
votes
1answer
620 views

Display current category title on category page

Using the following code in a category template, but instead of showing the current category page that I am on, it displays the first category of the first post. For example on Food category page it ...
0
votes
0answers
27 views

How to set a category by day name?

I have a category for each day. Sunday, Monday, Tuesday, etc. I want to show this category fixed depending on the day of the week. I'll also have other categories to filtering. So, the category day ...
0
votes
0answers
208 views

How to show only subcategories in parent category not parent category?

I just want to show only subcategories of specific parent category on parent category page. I have 1 parent category videos and 3 child categories art,funny,and technology of that parent. I didn't ...
0
votes
1answer
59 views

How can I list custom post by custom category?

From some references I wrote a code for create custom post type (journal) and taxonomy using following code. It works fine. Next I am add a new category from admin side for my custom post type ...
-1
votes
1answer
24 views

How to create categories out of a list of words?

I have a simple text file with a list of words (Berlin Hamburg Stuttgart ...) and so on. They are cities of germany an nearly 2000 counted. I need everyone of them as a category in my wordpress site ...
0
votes
1answer
103 views

Custom category for posts via XMLRPC

I have a blog located at one site that when I post into a category, it will auto-post via XMLRPC to another site of mine. This functionality works, but I would like to assign a category to these ...
0
votes
1answer
44 views

Displaying posts from a Category where the Category ID or slug is not known

This may be a really simple question but I've struggled to find an answer either searching here, WP forum or via Google. I have a number of different categories and I would like to use just ...
0
votes
3answers
47 views

How can I add single catogory for custom post type?

I am add new post type called journal using below code it works fine. But I now I need to add a single category for this post type. That is I have two types of journal category normal journal and ...
0
votes
1answer
108 views

Custom WP_Query for current category (in category.php)?

I'm using a small code to display a tag list for the current categories like below: <?php $custom_query = new WP_Query('posts_per_page=-1&category_name=overnachten'); if ...
0
votes
1answer
51 views

How to show post from category select

This code is in my functions.php: array( "name" => "Headline", "type" => "section"), array( "type" => "open"), array( "name" => "Headline Categories", "desc" => "Choose a category ...
0
votes
0answers
151 views

Best Way to Create Multi Level Categories/Taxonomies

I am looking for experience on the best way to create multi level categories. I am building a WordPress site for an organization that sells plant seeds. They have five levels of organizing their ...
0
votes
0answers
35 views

Taxonomy for costum post type not found

I'm trying to use taxonomies to create categories for my costum post type. I registered the necesary components: add_action( 'init', 'create_post_type' ); function create_post_type() { ...
0
votes
1answer
61 views

How to change the thumbnail size to a specific category?

I am using thumbnail on my blog posts. I added the following code in my functions.php for that purpose add_theme_support('post-thumbnails'); set_post_thumbnail_size( 328, 228, true ); It's ...
1
vote
0answers
44 views

Plural Category Base Slug On Category Archive Page

I've got a little problem with the category base slugs. Say I have got a category called 'Resources', with the category slug set to 'resource'. So any post in the category resource will appear with ...
1
vote
0answers
30 views

Category and guest post with 404

i use twenty twelve theme in wp with plugin of guest post and redirection because if any of user click on category and blank category shows a guest post page in redirection plugin i set one category ...
1
vote
1answer
44 views

Custom Post Type With Categories

I have copied custom post type code from WordPress and modified and added to function.php but Where is the categories box. I cant seen anywhere. I want also for this post. I am not good for ...
0
votes
1answer
47 views

Custom CSS to resize elements in multiple categories

I am using the following custom css (in a WordPress theme) to resize a certain element but only if it is in a particular category: .category-69 #main {width: 300px!important;} .category-16 #main ...
1
vote
2answers
1k views

How To Get Parent Category Slug of Current Post

My theme has styling by category using the following code, which inserts the current category's slug as a CSS class. <div class="CategorySpecificStyle <?php $category = get_the_category(); ...
1
vote
1answer
124 views

exclude post from displaying in loop if it is in a category, but not in many categories

I am searching how to exclude posts from displaying in a loop if them are in a category x, but not in many categories... The Problem: if I do exclude posts i.e. out of category 5, all posts are listed ...
0
votes
1answer
72 views

How to Highlight current category on category and single page template?

On Wp Forums, I found a code that shows categories with images and it works very well. But I couldn't figure out how to highlight current category on category.php and single.php Here is the code that ...
0
votes
0answers
48 views

Category and Sub category

There are two main categories such as Job by Education and State wise jobs, if a Job related post is posted how the post can be listed in both the two main categories and sub categories,
0
votes
0answers
28 views

Wordpress Native Function To Show Publish Box, Select Categories Form etc On Plugin Page

The picture above showing the default forms those are available on metabox of wordpress post/page editor screen. Is there a wordpress native function to show those forms on a custom plugin page ...
0
votes
0answers
105 views

Infinite scroll and ajax not working properly

I have category page (work) which list all the work post in this category. I also plug infinite scroll plugin which load next post of the same page. On click I load content of that post. but in next ...
1
vote
1answer
155 views

Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms

I am using Isotope to filter posts on the fly from my archive pages. I have a Custom Post Type called "art". On the sidebar, I've created links to yearly archives on my sidebar, i.e. 2014, 2013, ...
0
votes
0answers
28 views

Trying to create hierarchy between 3-4 custom post types

I am trying to think of a way to create a certain hierarchy between several post types. I was looking at term_taxonomy table, and its seem to have the capability to achieve that. I have a feature to ...
0
votes
1answer
71 views

Return category posts with WP_Query

I have a some categories and want to get the posts with those categories: $temp = $wp_query; // assign ordinal query to temp variable for later use $wp_query = null; $wp_query = new ...
0
votes
1answer
528 views

ACF: Display category name using taxonomy field

I'm currently using the taxonomy field in ACF, with the aim of printing the category name in the front end. Using it like so: <?php $term = get_sub_field('category_selector'); if( $term ): ?> ...
0
votes
0answers
56 views

Display Category only if there are posts of custom type

I need to do a small modification on WP site done by someone else. And my WP experience is close to zero. But I'm comfortable with PHP. Wordpress Version: 3.8 Plugins: ONLY Advanced Custom Fields ...
0
votes
0answers
57 views

WP No Base Permalink only works with logged user (admin)

(My apologies for my poor English, I'm french) I just want to have a shorty URL for all page of my WP Site: www.example.com/wordpress-answers-is-a-good-site for my posts insteads of ...