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
0answers
10 views

If x comments in a post move post to category y

If a post has 0 comments do nothing. If a post has 1 comment move the post to category 1. If a post has 2 comments move the post to cayegory 2. If a post has 3 comments or more move to category x.
0
votes
0answers
8 views

How to add categories to posts on specific future dates and time?

How can I add in admin page a functionality for each post to be able to choose for each post separately a specific future date and time (based on a date and time format settings configured in ...
0
votes
0answers
9 views

Change woocommerce Product categories title only in one page [closed]

Hi I would like to change the woocommerce product title only for one page in my website. Is there a snippets code that I can use to achieve this result ? For example if I have a product category named ...
1
vote
0answers
7 views

Scheduling update post daily

I have created a function to change the post category to archive after expiry date. And it will update every time when I save a post. But the question is that how can I schedule an update for posts ...
0
votes
0answers
11 views

Showing list of categories with thumbnails on Blog page

Having a hard time figuring this out. I want the following: When a user opens my Blog page, I want something like the following to appear Examples of categories for my case in specific are: Mindset, ...
1
vote
1answer
22 views

List categories with posts

I know I can use wp_list_categories() to list categories, but how can I achieve to list also the posts under the respective categories, below an example what I want to achieve: category1 -- post ...
0
votes
1answer
19 views

Hide category name but show posts

I’m looking for a way to hide a specific category title (not all but just one specific category title) from being displayed on the home page, archives, and search results but still show the posts ...
0
votes
1answer
25 views

List all categories and count number of posts within based on custom date

I used this solution to count number of posts for each category (list). The counting is based on date post event (only from today's date). I got nothing var_dump show result of new WP_Query . but $...
0
votes
0answers
14 views

How to hide specific category over post thumbnails

How to hide specific category over post thumbnails ? I have circled in red in the example : Best regards,
0
votes
0answers
18 views

Show the tag if the custom field is set to “Yes”

Using the following code and shorcode, I display 10 tags in the basement of the site: function getTagListfoot($classes = '') { global $post; wp_tag_cloud( array( 'taxonomy' => 'tags_type', '...
0
votes
0answers
18 views

Data is lost after ajax call on Second filter (by date)

I have two filters. First one is the filter by post category, it works well. The second category filter is post by date (period = week, 2nd week) and work only on first click for this filter. Edit: I ...
0
votes
1answer
17 views

How to display custom taxonomy term specific post?

For example i have created a custom taxonomy news_type for custom post type news, if i add terms sports,games,politics to custom taxonomy so i want to display all post of politics taxonomy in a page,...
0
votes
0answers
21 views

how to loop through a specified array of categories

I need to create a template that lists all posts in a single category, then runs a secondary loop of categories specified in an array. For example: Page lists all posts "Award Winners". ...
1
vote
1answer
21 views

How to exclude category ID from Looper in Wordpress

I'm trying to exclude 2 (and potentially more) ID's from my loop, that displays all categories that have posts. The category ID's i'm currently trying to exclude are 1 and 19. I'm very new to PHP but ...
0
votes
1answer
22 views

Running script based on Category

I have a child theme with function.php where I am running a script in the header but now I want to tweak it to run only on posts listed under one category and avoid on homepage or other categories. ...
1
vote
1answer
20 views

Retrieving category's color with get_term_meta

I followed this tutorial to add colors to categories. However I can't make it work, when I try to use it in my loop nothing happens, I tried multiple versions but none was right. This is what I tried: ...
0
votes
0answers
13 views

How can I create a 'sub-blog' which has its own sidebar on individual posts?

I've created a WordPress site with a blog which has several categories of posts. One category, 'News', is a special one, and should display separately ('News' posts will only ever be tagged as 'News' ...
0
votes
1answer
4 views

Wordpress default post categories meta box widget

I have a plugin that automatically selects the categories in the wordpress post editor, sadly after installing the Rank Math - SEO plugin the default metabox of the post editor has changed and the ...
0
votes
0answers
9 views

Automatically assign taxonomy to all my subcategories

Right now I have this Category 1 > Category 2 I have a list of 300 subcategories that I need to assign to all my Category 2. Is there a way to do that?
1
vote
0answers
18 views

New Categories Not Shown In the Post Edit Page

I have a problem with setting up new categories for my new posts. When I publish my second article on the blog, I have created e new category. But when I posted it, the actual category is not showing ...
0
votes
0answers
14 views

How to display category list with category featured image

I am using Category Featured Image Plugin : https://wordpress.org/plugins/category-featured-image/ which sets a featured image for post by a category. The reason behind using this plugin is, it adds ...
0
votes
0answers
8 views

How to List Categories and Child categories by current logged in Author

I have created a site where all members are authors and is like a task managements system. Category -> Clients Child Category - > Brands So when a user/author is logged in i want he to see ...
0
votes
1answer
64 views

What's the Simplest Way to Override/Rewrite the %category% Permalink Structure Tag?

See: https://wordpress.org/support/article/using-permalinks/ By default, when someone sets their permalink structure to: /%category%/%postname%/ Post URLs appear like so: https://example.com/**abc**/...
0
votes
0answers
9 views

Categories to display 3 in a row instead of 2 and when clicked on should display only the Subcategories

Please I need help, I want to display my categories 3 in a row on mobile view and 5 or 6 in a row on computer view, and when clicked on should display on the respective subcategories without any post ...
1
vote
1answer
21 views

How to hide description on categories and tags?

Does anybody know how I can hide the descriptions from view for the categories and tags for my website? I have searched for a while but can't find any solutions. I would like it so that when they are ...
0
votes
0answers
6 views

affixing a parent category when importing xml into woocommerce

I configure import according to this manual.Categories are imported without hierarchy, all at the same level. What needs to be corrected in the code so that the hierarchy is taken into account when ...
0
votes
2answers
66 views

admin panel - How to remove “delete” button from category editing page

i want to disable, hide or remove delete buttons from category page I tried editing functions.php with no luck: add_action('admin_head', 'hide_category_buttons'); function hide_category_buttons() { ...
0
votes
0answers
10 views

Category Header

Do you know how I can edit the header in category pages? I want to change the color and the font. Thank you!
1
vote
0answers
9 views

Add a specific part of current category page url to shortcode

I have the following URL: website.com/category/xyz, where xyz can be hundreds of different words. I use a table plugin for displaying my content all throughout the website, and I want it to filter me ...
0
votes
0answers
16 views

Taxonomy custom check box meta field not getting saved

I am trying to add a simple checkbox to the category page but it not getting saved for some reason. Please help to fix the code below. Basically, I registered a meta then created check box. CheckBox ...
0
votes
0answers
10 views

How to match Category slug of one CPT with Second CPT?

I need to solve the problem which needs to be solve. Problem is I need to match post category / categories of one CPT with second CPT. if both are same then I want to display second CPT Posts in First ...
0
votes
0answers
14 views

Can WordPress term menu orders be changed?

WordPress Category Panel WordPress's default category page seen above. WooCommerce Category Panel (product_cat) category page for WooCommerce seen above. As can be seen in the picture below, there is ...
0
votes
1answer
11 views

Featured Category or Special Category in WordPress

Is there a way to make a category that will show in all categories in WordPress? For example, categories on my website are: Cat A Cat B Cat B1 Cat B2 Cat B3 I want a post tagged in Category A to be ...
1
vote
0answers
18 views

How do I hide or remove 'Category' from wordpress breadcrumbs

I'm building an ecommerce product page for a single product and am interested in including breadcrumbs. Since I only have a single product, how might I remove or hide the "Category" (...
0
votes
0answers
18 views

Subcategories randomly not working after page/post/category edit in wordpress. Fix: saving permalinks twice

We run a custom WP theme with some plugins including Yoast SEO premium and WPML. We also run a version without WPML. In the version WITH WPML subcategories (quite randomly) give back a 404. This seems ...
1
vote
0answers
22 views

Filter Categories in meta box for CPTs

Working with a custom post type in Wordpress, I would like to use the categories. So I added the categories to the cpt. No problems here. But, when adding or editing cpt items, I would like to filter ...
0
votes
1answer
17 views

How to get immediate children of a 'term' parent id through 'get_terms'?

I have a category orientation as: Series (ID: 15) (root category) Under 'Series', the following sub-categories are present: Series A (Contains 0 posts) Series B (Contains 1 post) Series C (Contains 0 ...
0
votes
0answers
9 views

Preventing specific portfolio categories from appearing on a Wordpress page

Im trying to prevent specific portfolio categories from appearing on a regular Wordpress page. I would be grateful for some advice about how to do this. Many thanks
0
votes
1answer
41 views

How to loop custom post_type from (a) specific category(ies)?

I'm using this code which works really fine to list quite everything I need as Featured image and title, from my custom posts "portfolio". <?php $args = array( 'posts_per_page' ...
1
vote
0answers
12 views

Multiple level category drop-down from the WordPress dashboard

Working with thousands of Categories in WordPress; parent categories, child categories, grand child categories. It is cumbersome trying to scroll through to select the desired category. It is either ...
1
vote
1answer
16 views

How to create button to direct to certain category

I am creating blog website for my client. I want to create couple of buttons and put them in the page. When clicking theese buttons user gotta be directed to certain categories. Thank you in advance
1
vote
1answer
32 views

How do I create a way for users to assign categories to a post from the frontend of the website?

Im looking for to add categories from a frontend post. I found a thread about this topic How do I create a way for users to assign categories to a post from the frontend? almost 9 years ago. There was ...
1
vote
2answers
31 views

Different templates for different category tags

Is there any method to create different template in a theme for different category tags search? For example, I have category 'blog' and category 'glossary' - there is no any similar tag for both ...
1
vote
0answers
8 views

Pagination not visible on woocommerce's category page

I am not able to display pagination on the category page on woocommerce, I have 18 products in a category but when I customise the rows and columns, it shows only a certain amount of products. I want ...
0
votes
1answer
8 views

Determine if term is Category or Tag

I am working on a piece of code for my plugin and I am trying to find the best way to pull Terms in to post object. The object will have the usual title, description etc. but it will also need ...
0
votes
0answers
5 views

how to redirect a url to a secondary category?

let me explain, I have this url website.com/category1/category2/category3/postname I would like to redirect you to the youngest or lowest category "category3" let it be like this: website/...
0
votes
0answers
9 views

Limit categories, tag count on back-end?

Before I re-invent the wheel. We are looking to limit the number of tags, or the number of categories that a specific blog article can be assigned to. I currently do this on the front end, similar to: ...
0
votes
1answer
19 views

Custom Loop with certain number of one category

I have a custom loop that shows 120 posts in total on a certain page. The posts are from several categories. That works perfectly. But I need to change it. I need: 120 posts only of the category 2 ...
0
votes
0answers
11 views

Display link to category over featured image

I managed to get the category to display in the corner of the featured image but what I want is for the function to be a link and not just the name. I'm sure this is deadly simple but my google-fu is ...
0
votes
0answers
4 views

Custom archive template: split “days” arbitrarily

I'm planning on posting to WP during a multi-day event. I'll be setting up a category hierarchy something like this: Events Event A Daily Report Interim Update Event B Daily Report Interim Update ...

1
2 3 4 5
93