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)

1
vote
1answer
96 views

Add “page-a” slug to category link if user visit category link from “page-a”

I have Area pages like below: http://www.example.com/area1 http://www.example.com/area2 On each area page common wp menus are displaying categories. To illustrate: Menu Items: -> ...
0
votes
1answer
192 views

How to get product count with respect to categories in WooComerce

Hi I want to display all the categories of products in a loop to display them in category menu along the numbers of products each category contains. Some thing like that so far I have done this to ...
1
vote
3answers
2k views

Use get_term_children to get the sub category of a parent category for the current post

In my WooCommerce theme I've created a root category: 'Brands' then for each product I've added it's brand as a sub category to the 'Brands' parent category. On the product page I want to display the ...
0
votes
0answers
16 views

Adding custom value to woocommerce category and pulling it

I have 3 categories in woocommerce say Restaurant1 Restaurant2 and Restaurant3. I have found a code (in internet) that displays the the category of product on checkout (Restaurant name )page as well. ...
0
votes
2answers
745 views

Hide a certain category name without removing it?

I have a category called feature which I use to have a feature post in the homepage. The problem is I don't want the category name feature to appear in this posts, but I want the other categories to ...
0
votes
1answer
21 views

Do not output category and tag ulrs

I'd like to use WP as CMS without blog functionality. I use some custom post types with cats and taxonomies, just for building up an isotope filter. My question: Is it possible to do this without ...
0
votes
1answer
29 views

Loop doesn't work

I'm making a box in my sidebar that shows with a loop a list of articles of a single category: <?php // The Query query_posts('cat=31&posts_per_page=5'); // The Loop while ( have_posts() ) : ...
0
votes
1answer
54 views

get_posts() with custom post type does not work outside page.php

I have created a custom post type called "community", created a new post with a category (cat id = 6). I am using the following code: $args = array ( 'numberposts' => -1, 'post_type' ...
7
votes
2answers
3k views

How to check if I'm on the last page of posts?

I want to display some text on the last page that isn't displayed on the other pages. For example, on category pages: url.com/category/categoryname/page/6 or last page of all posts listed on the ...
0
votes
1answer
790 views

Category menu that filters out empty categories

I'm trying to build a menu which can be administered from the menu editor, but gets filtered before being output. More specifically the menu contains Woocommerce product categories, organised into a ...
0
votes
1answer
44 views

Showing the project type in HREF

Im kinda new to PHP so bear with me. Im building a site for my uncle using the Fluxus Theme in Wordpress. He's an artist, his art is displayed in the following order: Menu Category1 --Actual Art ...
0
votes
1answer
46 views

Randomly load categories with latest post

I am creating a slider that loads 5 different categories. The categories are randomly loaded into the page. So I know the id's of the categories and they are loaded random to the page. What I want to ...
1
vote
2answers
2k views

Specifying multiple categories in URL (permalink)?

For example: http://www.example.com/dell/studio/studio-1558 where dell and studio are categories A few months back I heard from someone that it is not possible. I need to know why? Which part of code ...
1
vote
2answers
435 views

Multiple custom post type loops in category.php

I have multiple custom posts types that use the same category taxonomy. Let's call the CPT's 'venue' and 'story', and say we have categorised each of them as 'foo'. I already have the following code ...
0
votes
0answers
8 views

Linking posts and categories using an automata

I migrated a blog from Blogger to WP and now have some 900 posts to which I have to assign categories. Doing it manually isn't practical, so I designed a parser looking for keywords in the posts. All ...
1
vote
0answers
59 views

List all categories with featuread image from post?

With this code I show all categories: <?php $args = array( 'orderby' => 'name', 'parent' => 0 ); $categories = get_categories( $args ); foreach ( $categories as $category ) { echo ...
-1
votes
2answers
1k views

wp_list_categories() not listing categories

I've many categories in my database but when i'm calling wp_list_categories() it is not listing any categories, its only outputting Categories No categories Also, I'm trying to populate it using ...
1
vote
0answers
36 views

polylang + category/tag custom language link

under wordpress user can define url part for categories/tags, e.g., page.com/category/some-cat where category is user defined string part. Is there a way to define "category" (same goes for tags) for ...
2
votes
2answers
66 views

Alphabetizing Posts in a Category Page?

I have written up a page template that will list posts in the same category as the name of the page. I am wondering how to alter it to get it to return the posts in alphabetical order? I have been ...
0
votes
0answers
32 views

Change permalinks for posts except those in excluded category

is it possible to change the permalink for certain posts only, depending on their category? The structure at the moment for posts is: Home: site_url (showing posts in category A) Custom page: ...
1
vote
0answers
44 views

Filtering *out* a taxonomy from the admin post list

I've got a custom post type 'Speakers' that, after some time, are added to a custom 'archive' taxonomy so that they can be sorted into different sections of the site. I'd like a way to hide any ...
0
votes
1answer
11 views

Add category information beneath post?

I was wondering if it's possible to automatically show some text about a given category beneath the post. I'd like to be able to show some text beneath some (but not all) categories. Use case: I'm ...
1
vote
1answer
49 views

Woocommerce - remove product from category

I'm trying to do the following, but I'm stuck with coding. Hope someone can help me out here. In Woocommerce (on the product-edit page) I can choose in which category the product will be. I made a ...
0
votes
0answers
20 views

Automatically add category to a child custom post type

I have created 3 custom post types, using wp-types plugin and Cred front editor plugin: 1. Listino (pl.Listini) 2. Negozio (pl. Negozi) 3. Consegna-listino (pl. Consegna-listini) Post types #3 are ...
0
votes
0answers
24 views

Pagination issue when category is set via function.php

I can get wordpress to show only one category of posts on the homepage via either the function.php file with the following php code... function my_post_queries( $query ) { if ($query->is_home() ...
-1
votes
1answer
51 views

Automatic category for a Custom Post Type

I've created two new CPTs called 'Movie Reviews' and "Game Reviews". In my website I also have one category called 'Reviews' where you can find two sub-categories: 'Movie Reviews' and 'Game Reviews'. ...
0
votes
0answers
20 views

How to neatly list categories on a page

How would I go about and get something like this? All I find is how to list it with wp_list_categories ('orderby=name&amp&show_count=1&title_li='):
0
votes
0answers
13 views

Is using categories for site structure a bad solution

I've been thinking about a current site structure implementation that relies on categories to build out the menu structure and the category template to render site content. As categories can change ...
0
votes
0answers
14 views

Tab within category page

I've a website where I use categories in my menu, so to display the posts for each category in one specific place that corresponds to the category itself. Here is the page As you see, each ...
0
votes
1answer
59 views

the_content() not showing full posts in category template

i want to show the full posts in category archive page, i put the_content() in the category template (content.php) <article id="post-<?php the_ID(); ?>" <?php post_class( 'entry' ); ...
2
votes
4answers
5k views

Display posts from the same category using next/previous post link

I am using this code, but once I click on the next post/previous post link, I am redirected to the next post/previous post of a different category. previous_post_link( '%link', 'Prev post in ...
0
votes
1answer
48 views

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 ...
1
vote
1answer
56 views

Count posts in category including child categories

I have found this code somewhere, it counts posts but only which are under specific category. I would appreciate if someone could expand this so it would count all posts which also belong to its child ...
2
votes
1answer
1k views

Combine two taxonomies in a hierarchical tree

For example, I have WooCommerce products that have taxonomies: brand (e.g. Converse, adidas, D&G) (taxonomy id: product_brand) category (e.g. Boots, Sneakers, Sandals, Heels) (taxonomy id: ...
0
votes
0answers
38 views

Hiding a specific category name on template pages

I have a specific category "Featured" whose category link I don't want associated with posts on the front end. I still want all other category links to show up, and I don't want the posts marked as ...
0
votes
0answers
10 views

Slug uniqueness for an ecommerce with categories [duplicate]

I come to you because I have a problem and i'm looking either for a solution to it, or alternatives. I've spent all day long trying to find a way to make it work. Let me explain. (Quick recap) ...
0
votes
0answers
23 views

Different templates for categories without plugins [duplicate]

Is it possible to show category pages using custom page templates without plugins? I want to give the administrator the ability to add new categories and select templates. Something like this: ...
1
vote
1answer
28 views

Display categories with child category separated by letter

I'm trying to show both the parent and child categories of my custom post type separated by the first letter of the category What I have. A. Apples B. Bananas C. Coconuts What I want A. ...
0
votes
1answer
89 views

Product Category Page in Full Width

Initially the Product Category page is divided into Content Area (70% width) Side Bar Area (30% width) I have removed the side bar area using function.php. However the content area is still in 70%. ...
0
votes
0answers
27 views

Multiple level category and sub-category drop-down

I need to get all parent categories only in drop-down, And only child categories of all parent categories in my site. I try now to get all parent category and its work good : <?php ...
1
vote
1answer
36 views

Change the_content() in Theme Thirteen

I worked with site created on Theme Thirteen and theme uses <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?> to get post ...
3
votes
1answer
57 views

Is it possible to put tags and category information in the post as text?

Is it possible to put tags and category information in the post area, so one doesn't have to click the appropriate fields and use the mouse? Ideally I just want to type "#art" "cat:painting" in the ...
0
votes
2answers
64 views

Show archives by year from just one category

yesterday @jas helped to how to show archive by years in my nav. It works fine, but there is the second one little problem. The @jas's solution filter me posts from all categories by year, I'd need ...
1
vote
4answers
7k views

Direct link to category?

I'm trying to build up a menu of category links for specific categories I'd like to highlight and apply styling/classes to. I've tried this sort of thing. <li><a href="<?php ...
0
votes
2answers
29 views

Redirecting category link to first child post

I am trying to redirect the category link to the first child post. I am using following code in category.php. This redirects, but link doesn't go to first child post. How can I redirect to the first ...
0
votes
1answer
37 views

Custom post type and category permalinks

I would like the URL structure of my site to be like this: http://localhost/testwp/books/education/my-title-book I am using the WP Types plugin and I have created a custom post type, books, and a ...
0
votes
1answer
105 views

Get the child category ID of current category

I am trying to get the category ID of the child (no grand children) of the current category. Using below method: $category = get_category(get_query_var( 'cat' )); // get category ID $catid = ...
0
votes
0answers
15 views

Getting Post Tags From Certain Categories

The site I am working on has about 4 different post categories. I need to output a list (unordered) of tags in that category so that a user can click on them and see posts in THAT category tagged with ...
0
votes
2answers
191 views

How to display wp_list_categories on div instead of li?

Does anyone know how to display the wp_list_categories() on a div instead of the li? I basically want to wrap main categories and its children in a bootstrap column. $args = array( 'taxonomy' ...
0
votes
0answers
31 views

Only display the subcategory posts in the category page

I have worked with WordPress for a few years and never encountered such case where I need to display posts published under the sub categories of the parent category without parent's post or grand ...