Questions tagged [categories]

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

Remove parent category from child/sub-category page URL in Wordpress

I want to remove the parent category from sub-category page URL. (actually I need it only for a specific parent-category) f.e, convert the URL of all sub-categories pages under this parent-category, ...
user avatar
  • 1
0 votes
0 answers
9 views

Same category and post base

I’d like to have the following stucture: Single Post: test.com/blog/post-name/ Category: test.com/blog/my-category-name/ If I go to permaliks and set: test.com/blog/%postname%/ it works okay But if I ...
user avatar
  • 1
0 votes
0 answers
10 views

exclude certain categories form archive widget

i need some help for this...i want to hide posts of one specific category from appearing in the (sidebar-)archive-widget (chronological order, dropdown). I already tried to use the "ultimate ...
user avatar
0 votes
0 answers
9 views

Display Sibling WooCommerce Product Categories on Archive Page

To the lovely people of StackExchange, I've created the following code to list WooCommerce categories on category archive pages, and it's mostly working as I'd like. However, I'd like to modify it so ...
user avatar
0 votes
0 answers
20 views

Allow / show post comments in category pages

Is there any way to allow the users of a website to write comments (and also see the already published comments) on one post when it's displayed in a category page? I'm not looking to let the category ...
user avatar
  • 1
0 votes
0 answers
18 views

Exclude Woocommerce Product Category From Sitemap

Am trying to exclude 2 specific product categories from default WordPress sitemap. Any help how to archive this? add_filter( 'wp_sitemaps_posts_query_args', function( $args, $post_type ) { if ( ...
user avatar
  • 35
0 votes
1 answer
20 views

Wordpress bulk category select when publishing post

Often I need to attach post to all categories and I have about 200 categories. When I need to select all categories while publishing post , I select categories one by one. How can I add select all ...
user avatar
0 votes
0 answers
15 views

wp_get_post_categories not work currently on loop.php

I'd like to design the category page for them. on this page, we have to show the last category of each post beside each post title. So I want to display the last category from each post, on the ...
user avatar
  • 155
0 votes
0 answers
11 views

Post incorrectly excluded when using "category__in"?

I have a wp_query using the following arguments. While I have the 'category__in' line commented out, I get all 3 results I should. Shown below with the IDs of the categories they belong to. Category ...
user avatar
0 votes
0 answers
17 views

Add properties to term object

A typical WP_Term Object, for category might look like this; WP_Term Object ( [term_id] => 5 [name] => News and Views [slug] => news-and-views [term_group] => 0 [term_taxonomy_id]...
user avatar
0 votes
0 answers
16 views

how to remove alphabetical order of category in WordPress?

As you see in the image (momin khan momin ) is subcategory of (poetry by poet) category. But sub category is not showing exact after its parent category. categories & sub categories are arranged ...
user avatar
0 votes
0 answers
22 views

Show Posts via cat1+cat2 in URL that are in both Categories doesn’t work

it seems like i am the only person on this planet currently experiencing this issue. When i search for www.gooloo.de/category/balea+vegan, it should only show posts, that are in BOTH categories, but ...
user avatar
0 votes
1 answer
13 views

How to set category correctly for a custom post created by a remote API call?

I'm using a plugin - "cleverness-to-do-list" (https://wordpress.org/plugins/cleverness-to-do-list/#description ). I'm aware that the plugin is closed, but I've updated it at my end and ...
user avatar
  • 113
0 votes
0 answers
5 views

excude a specidic category from showing in the "relative posts"

I have a post slider on the homepage that shows a specific category (slider). The thing is that I do not want this category to appear on other pages (except homepage) because I have "relevant ...
user avatar
0 votes
0 answers
28 views

get_object_term_cache duplicate terms after update to wordpress 6

After WordPress update to 6 versions receives an issue. receive duplicated terms on function echo wp_kses_post(get_the_term_list($product->get_id(), 'product_cat', '', ', ', '')); and echo ...
user avatar
  • 1
0 votes
1 answer
24 views

Assigning a category to a custom post type in Wordpress

I am working with custom posts to create a 'document' custom post type and then trying to assign the category during wp_insert_post, have tried using both post_category and tax_input to no success. I ...
user avatar
0 votes
0 answers
16 views

How to use category slug with a regular page

To make better looking category pages in my sites, I'm looking for a way to show the content of a regular page on the permalink /category/name. How can I achieve that ? Thanks
user avatar
0 votes
0 answers
25 views

Show posts from a single category by default using wordpress.com

I have a blog at wordpress.com on the legacy "Personal" plan. I blog about different but related subjects and categorise the posts accordingly. The blog was originally about one subject but, ...
user avatar
  • 101
0 votes
0 answers
24 views

Related posts by current posts child category

I'm trying to use this code to display related posts by the same category as the current post but if the post is in a child category, i need to show related posts by that child category, not the ...
user avatar
  • 446
0 votes
1 answer
19 views

How do I add a tag slug to a category URL to filter posts?

I want to add an option to my site to filter posts by one specific tag on the category page and at the same time have a nice URL (no query strings). So something like this: https://example.com/%...
user avatar
0 votes
0 answers
11 views

Multiple categories assigned to a single product breaking the breadcrumb

custom bread crumb not working with multiple categories assigned to a single product, we do not have the categories page, so don't want to show categories in the URL, but need to show the categories ...
user avatar
  • 189
0 votes
0 answers
25 views

Display a specific category in a focused area of my site

I've been trying to change the code of my WordPress site. Rather than showing "trending posts" which is determined by post_views_count, I simply want to show posts from a certain category. ...
user avatar
  • 1
0 votes
0 answers
16 views

Post in bulk based on category template

Let's start with an example of what I want to do. take a look at hardreset.info / devicesfaq.com as you can see, the articles are almost the same, they only change few keywords / or based on title (...
user avatar
0 votes
0 answers
25 views

Pagination at category doesnt work with same name of page

i have a problem with my pagination but only at category page. I'am not developer, and i try fix it from few days. My pagination working if i make different name of pages for main BLOG, and category ...
user avatar
0 votes
0 answers
26 views

Wordpress PageNavi Plugin not working in category.php

I tried different codes to be able to use the PageNavi Plugin in category.php, but all were not working. I don't know what was the problem? here is my working category.php code: <?php $cat =...
user avatar
0 votes
1 answer
30 views

Category post count is not correct

When I go to Posts > Categories, some categories show that they have a post. See screenshot. But there are no posts linked to that category. When you click on that "1"-number, no posts ...
user avatar
  • 125
0 votes
0 answers
16 views

Display all categories but only if they have posts in them that have a specific tag assigned

I have a WooCommerce site and am working on the product tag pages. I want to display every product that is assigned to that tag, and break them up into their individual categories (this bit is working)...
user avatar
0 votes
0 answers
16 views

Sort posts by child category name

I have a category "year" and child-category names with year numbers 1966, 1972, 1980 etc. I have a category "publisher" and child-categories with publisher names. Each post is ...
user avatar
0 votes
0 answers
70 views

Woocommerce. Get a list of products in the current category on the archive page and product page

I'm trying to create a small code that will display a list of discounted products that belong only to the category of products that the user is on, that is, if the user is on the clothing category ...
user avatar
0 votes
0 answers
21 views

How to fix select filter on category

I created a filter where I can filter on different types of machines by a custom taxonomy. It shows the right taxonomies in the filter and after submitting the right url is shown. Problem is that ...
user avatar
0 votes
0 answers
17 views

404 on category URL

I think this is basic but none of the advice I have found seems to work for me. My URLs that access a category directly have been working for 3 or more years but no longer work since an upgrade and ...
user avatar
0 votes
0 answers
9 views

Disable Category Taxonomy

There's a similar question to this posted back in 2013 (Completely disable categories), but the proposed solution doesn't provide information as to how to implement it (where do I place the provided ...
user avatar
0 votes
0 answers
13 views

Intermittent Gutenberg 504 Gateway Timeout when calling REST route to retrieve categories

Our Wordpress site uses the Gutenberg editor for editing posts, and occasionally many of our users experience 504 Gateway Timeout errors when the editor is loading in their browser. Specially, it is ...
user avatar
  • 101
0 votes
0 answers
23 views

How to select a category automatically based on a word in WordPress post title?

I am working with an auto-posting blog where the articles come through RSS Feed. There are lots of posts publishing every day automatically. Now I need to get a category automatically based on a word ...
user avatar
0 votes
1 answer
36 views

Duplicate new categories across multisite network

I'm attempting to setup a MultiSite network, and want the same structure across the sites. This includes Categories. I've already got code that duplicates Posts - but discovered that if the original ...
user avatar
0 votes
0 answers
9 views

display specific category when website loads

I have a website with WordPress and I want to load a specific category when the page loads. I have not tried it. Will it create problems or error if I change it.
user avatar
0 votes
0 answers
49 views

Filter sub-category from checkbox form

I’m having have a checkbox filtering issue in wordpress - Please have a look at the details below - Any help would greatly be appreciated! What I’ve built: I created three custom taxonomies of topics, ...
user avatar
0 votes
1 answer
39 views

wp_dropdown_categories() works correctly but the list is not filtered in admin for custom post type. What is the problem?

When the filter is executed the correct query is passed as edit.php?s&post_status=all&post_type=banner&action=-1&m=0&banner_cat=31&filter_action=Filter&paged=1&action2=-...
user avatar
  • 59
0 votes
0 answers
17 views

Counting number of posts in multiple (sub)categories using shortcode

I'm making a new cycling team website and on the home page i have 3 different type of stats: "Win, Podium and top-10" Now i want the number of the stat go up if i post something with for ...
user avatar
0 votes
0 answers
24 views

Excluding current category from sidebar's post widget, elementor, query-id

I have an archive page which displays current category. On the right I have a sidebar that should display recent posts, but without posts that belongs to the current category that I am watching. Here'...
user avatar
  • 1
0 votes
1 answer
44 views

Exclude some categories from listing on the current post

this should be simple, but it seems it is not. I simply want to not list some of the current post's categories, just exclude them from the list of categories the current post belongs to I use this for ...
user avatar
  • 165
0 votes
0 answers
18 views

How do you get sticky posts to work with categories?

How do you get sticky posts to work with categories? I have tried: $query->set( 'ignore_sticky_posts', 0 ); but this just results in an out of memory error. I have tried restricting posts on the ...
user avatar
0 votes
0 answers
15 views

How to make ajax load posts from the current category?

I have a function which loads in posts by click, however on category pages /category/**** when using that button it should only load posts for the same category. I can't seem to get it to work and not ...
user avatar
  • 13
0 votes
0 answers
19 views

Wordpress - When visiting a `single post/ single.php` my category menu item link becomes active

I'm new to WordPress. So, I'm not really sure if it's normal behavior or not but this is bothering me. So, I've my main navigation menu consists of Home | category_1 | Category_2 | Category_3 ... The ...
user avatar
  • 101
0 votes
1 answer
14 views

How to divide Subcategories into pages of parent category wordpress

suppose I have sturucture like this: Justin Bieber > Albums > Justice when I visit on https://example.com/category/justin-bieber/albums/ It is showing all albums of Justin Bieber category. but ...
user avatar
0 votes
0 answers
16 views

`offset` WP_Query argument dont work via `pre_get_posts`

I have some weird problem because pre_get_posts filter completely ignoring offset argument. Here is function from functions.php file: function custom_category_query (WP_Query $the_query) { if ( !...
user avatar
  • 145
0 votes
1 answer
29 views

Use get_cat_ID to retreive multiple category IDs

I am trying to use the names of categories stored in user meta (ie users' preferences) to control an on-page query’s parameters. $topicsofinterest = get_user_meta(get_current_user_id(),'...
user avatar
0 votes
0 answers
24 views

Migrate the posts of a category to another blog as a custom taxonomy

I'm running a multisite WordPress, and I need to so the following migration between 2 blogs: All the posts of a sub-category X that has the parent category programs from the blog A. To the blog B ...
user avatar
0 votes
0 answers
54 views

Function the_posts_pagination() not compatible with WP_Query arguments

I trying to make a list with posts from specific category. It's supposed to work as the loop in category.php file. Unfortunately i have problem with pagination links which are completely not ...
user avatar
  • 145
0 votes
0 answers
11 views

Make the home page template my archive/category page template without code duplication

Exploring WordPress and bumped into this issue: In my theme root page-templates/home.php which is a common page template used in multiple pages. Now I want to include the same template (with some ...
user avatar
  • 101

1
2 3 4 5
96