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.

1,434 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0 votes
0 answers
61 views

Change post category within pre_get_posts

I have written a filter to be called in pre_get_posts to remove posts from a category page based on a meta_key (EventDate which is in the form YYYYMMDD), which is working. However I'm struggling ...
Jon's user avatar
  • 101
0 votes
0 answers
81 views

How to create a category loop on my blog (ACF Plugin)

I want to create a category loop on my blog site, i already created some categories and uploaded featured images for them, but what's the next step? Thank you :)
Mr Sag ich nicht's user avatar
0 votes
1 answer
41 views

Please tell how to stop the category from showing up on posts

Please tell me how to remove the category hence, it does not show up on posts. my content.php file is given below...which contains the code for showing up meta. but I am not able to figure out the ...
Anshul Kashyap's user avatar
0 votes
0 answers
79 views

How to add excerpt and read more button to category archive page

I am finding it hard to add excerpt and read more button to my category archive page
Chisco687's user avatar
0 votes
1 answer
4k views

Wordpress Categories as a Grid

I like to create a Grid on my Homepage based on my Wordpress-Categories. I also would like to filter them. On the attached image, you can see what i mean. Which Plugins do i need? Thank you very ...
Mr Sag ich nicht's user avatar
0 votes
2 answers
288 views

Hide a category/posts from the homepage in wp

I tried it all and since i am not so good in this coding, I want to hide a category and his posts from the homepage I tried all plugins especially wp hide post but it needs pro version and seems ...
paco's user avatar
  • 1
0 votes
0 answers
28 views

Is there a way to save different data when USER interacts with the same POST?

I would like a kind of relationship database without create database because I’m not very confident with it. So I think about an alternative using Wordpress default features like posts, categories ...
Steffi's user avatar
  • 755
0 votes
0 answers
639 views

How to add a block to a category page?

I've got my wordpress site set up to show various menu pages that will feature the content of a category page. I'm curious, is there any way to add a block to the category page? I have a filter that ...
Matthew Wheelock's user avatar
0 votes
0 answers
192 views

Get meta values from parent post and save in child post

I have a custom post type "E-Books" with two categories "E-Book Title" and "Chapter Page", and custom meta boxes (table of contents, etc). The E-Book post type uses one page template, and displays ...
Kenneth Valinote's user avatar
0 votes
1 answer
562 views

how to get only grandchild category from a child category

how to get only grandchild category from a child category list currently i am using the code bellow for get child category of parent. <?php $args = array( 'orderby' => 'name', 'parent' => ...
user3244304's user avatar
0 votes
2 answers
102 views

How to modify custom category field from front end?

I tried: wp_update_term($personid, 'category', array( 'name' => $_POST['nameChange'], 'slug' => $string, '_city' => $...
rob.m's user avatar
  • 207
0 votes
1 answer
39 views

How can I restrict the categories users can post in, based on user roles?

So far I've only found plugins that are either obsolete or only affect which categories are displayed. EDIT: The result should be that users can only select certain categories when they publish their ...
Malory's user avatar
  • 1
0 votes
1 answer
36 views

Style post archive blog preview based on category

0 down vote favorite I have a page showing your typical series of small post teasers - images, excerpt etc which advertise properties for lease. I would like to have the ability to add a 'new' or '...
sheree's user avatar
  • 1
0 votes
0 answers
170 views

Check the product in the cart from which category is and show message

I want to check the product in cart from which category is and if is from Category X to show some message. So far I've done this and I've placed it in checkout.php $categories = array('cat' => '...
S.I.'s user avatar
  • 125
0 votes
0 answers
21 views

Excluding particular category from displaying in specified areas

Here's my site: http://tophistorie.pl/ I have one category that is responsible for displaying posts in slider (slider displays certain post if it has a specfic category assigned). The problem is that ...
kacper3355's user avatar
0 votes
0 answers
36 views

How to define a post category undeletable by other users?

I would define a post category and I would make it not editable e not deletable by other users? Is it possible in some way?
marco's user avatar
  • 193
0 votes
1 answer
3k views

WP_Query showing all posts, except from category X, unless it's also in Y

I'm trying to show posts from categories A, B, C, D...and Y, except X, unless posts in X are also in Y, then show them with the rest. I can hide category X on it's own pretty simply: $args = array( ...
dmoz's user avatar
  • 166
0 votes
1 answer
749 views

How to get the_category(', ') with link "title" attribute

In my theme I use <?php echo the_category(', '); ?> to get the categories, separates by comma, with links to them. But those links have no title attribute. Is there any way to get them?
Damian's user avatar
  • 87
0 votes
1 answer
54 views

List all taxonomies with their descriptions

I have this snippet below that lists all my categories in linked hierarchical order and their descriptions. I was hoping someone could update it to allow for a specific custom taxonomy instead? ...
Pete's user avatar
  • 998
0 votes
1 answer
46 views

Query post if has two of the categories

I'm banging my head here. I can't seem to figure out what's wrong with this it works although if a post has more than two categories is doesn't seem to show. What is wrong here? <div class="base-...
Mark Anthony's user avatar
0 votes
1 answer
36 views

How to display particular categorie's post which associated to specific user?

How to display particular categorie's post which associated to specific user? http://tugsemegtei.mn/category/fish/ Above link displays all the posts under fish category, but how can I display only ...
anandmongol's user avatar
0 votes
1 answer
285 views

Display all posts from specific category

Problem: I'm trying to display all posts from a specific category named 'Culture' (slug: culture) in my website. However, I'm always getting an empty field. My Attempt: I've tried to use the same ...
Maria Herrera's user avatar
0 votes
1 answer
98 views

Automatic Set Category For A Custom Post Type

I hope you can show me the way please. I will explain through an example which is easier. I have a custom post type "juicing_fruits", this post type has a few custom fields that are saved in an array: ...
Spino's user avatar
  • 1
0 votes
1 answer
39 views

Display Specific Categories posts on the home page

I want to display categories posts in the following format on the front home: Health: 1st post 2nd post 3rd post Fitness: 1st post 2nd post 3rd post Beauty 1st post 2nd post 3rd post ...
rudyards's user avatar
0 votes
0 answers
128 views

Admin backend, show post from a category and exclude the posts from subcategories

In the www.myexample.com/wp-admin/edit.php?category_name=mycat I want to see only the posts which are in mycat and not in its subcategories. Any hint on how to achieve it? Here is what I've tried at ...
Revious's user avatar
  • 313
0 votes
2 answers
67 views

Woocommerce: all products of all categories instead products of one category

I want to get all products of category by category name (slug). Сategory has no parents or children. I wrote my code according to this answer. My code: <?php $args = [ 'post_type' => '...
Vlodko's user avatar
  • 193
0 votes
1 answer
18 views

Creating a linkable category list with post count

I am trying to create a new education site that has two types of resources, courses and informal learning. I am trying to do this without using custom post types or taxonomies. The site with use the ...
David Zweigel's user avatar
0 votes
1 answer
322 views

Trying to remove a couple categories from shop page

I have tried several snipits to remove two categories from the shop page of https://ornaments.com function exclude_brands_from_related( $categories ){ // array of category id's that should be ...
Earrame's user avatar
0 votes
0 answers
259 views

Ajax load more not working with multipler categories

I am trying to make post filter. Here is index.php <?php $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => get_option( '...
wpdev's user avatar
  • 539
0 votes
1 answer
385 views

How to allow editors to only edit certain categories?

Is there a way (through code or plugin) that can make each editor responsible on editing certain categories of the site
adilmrk's user avatar
0 votes
0 answers
62 views

i can't use wordpress functions in ajax loaded php file

I want to make a chained select like this brand > model for that i make a file named cat.php in my themes folder that contains this code <div id="categories"> <?php $args = array( ...
Amin Poursaied's user avatar
0 votes
1 answer
25 views

Yoast and another plugin

So, Yoast plugin is sayin that - You have far too little content. Please add some content to enable a good analysis. But I have content.. I know that Yoast not working together with other plugin, ...
Renars Krastins's user avatar
0 votes
0 answers
18 views

Removing catagory for new blog pages

I have three blog pages named 'blog' 'page_2' 'page_3' and four categories named 'cat1' 'cat2' 'cat3' 'cat4' in WordPress. Here 'blog' is the default blog page. Problem is when i submit a post it ...
Habib's user avatar
  • 1
0 votes
1 answer
697 views

how to create custom taxonomy drop downs for parents and child

Can someone help me please, i'm not good with php. i have created a custom post type called "used-car" and a custom taxnomy called "used-car-category" in functions.php Question: I need to create a ...
immz's user avatar
  • 1
0 votes
1 answer
34 views

How can I exclude a particular category from my Wordpress Page 1 and Page 2?

I have 2 pages in the Wordpress site. All 2 pages are showing posts. I need to restrict few categories in First Page and other few categories from Second Page. <?php function excludeCat($...
Sajeev's user avatar
  • 101
0 votes
1 answer
1k views

Product Category page showing all products

Our WP system uses the following plugins: WooCommerce v3.4.4 WooCommerce Stock Manager v1.2.6 Display Productfor WooCommerce v2.0.19 Sorting WooCommerce Pro v4.0 Salient Theme v7.0.8 Salient ...
Nick W's user avatar
  • 123
0 votes
3 answers
885 views

How can I list all slugs categories?

I need to list all slug categories from a taxonomy portfolio_category. Like this: the_terms( get_the_ID(), 'portfolio_category', '', ', ' ); This returns categories from a single portfolio. I want ...
martins's user avatar
0 votes
2 answers
470 views

Meta Box: display single image on an archive-template

I'm trying to get the url of an image from a MetaBox (plugin) filed on an archive-page. <?php if ( rwmb_meta( 'field-id' ) ) { // Get images $img_srcset_large = ...
Luke's user avatar
  • 59
0 votes
1 answer
906 views

Wordpress display only child category in template

I have a blog with 1 parent category and 3 child subcategories. For technical reasons, in the backoffice, when I write an article, I have to check the parent AND the child category. In every article, ...
Hellooo's user avatar
0 votes
1 answer
75 views

Menu with category 2 category combined

I need to create 2 category menu in my wordpress site. One in the sidebar, one in the content. In the content I need to have only ingredient menu, so fish chicken ...and so on. In the sidebar I ...
BigBlack's user avatar
0 votes
1 answer
62 views

Displaying only selected categories

I am trying to show only selected categories (or taxomony) from the dropdown, right now my code jumps off to another page of the selected category. How Can i do that? $option ; $categories = ...
DCR97's user avatar
  • 3
0 votes
1 answer
303 views

Limit post top level categories to one

My website have many posts, ~9 main categories and "unlimited" subcategories. I'd like to force in WordPress panel that you can't choose more than 1 top level category but you can choose unlimited ...
HazeHybrid's user avatar
0 votes
0 answers
26 views

How to manage a dynamic multi-level page hierearchy system?

I am developing the pages/custom posts for my website, and I cannot wrap my head around exactly what I need to deliver the best solution for my users. My users in this case are editors who log in to ...
Rollins's user avatar
0 votes
1 answer
38 views

WooCommerce change

I have the code below to change one category of a regular post after a scheduled event. It works perfectly. However, I need it to target a WooCommerce product category. My question: is there a way to ...
Lani Gouws's user avatar
0 votes
1 answer
38 views

Some subcategories not working on custom portfolio sort

I have a portfolio and we have added custom secondary sorting based on sub categories. Client clicks categories and sub categories in backend. On front end... user picks main category... a lit of ...
Scott's user avatar
  • 1
0 votes
1 answer
401 views

How to get the categories of a selected blog on multisite?

I trying get the categories in a function from a selected blog on my multisite with switch_to_blog, but I get the categories of the current blog, and I dont understand, why... I searched the solution ...
Galgóczi Levente's user avatar
0 votes
1 answer
651 views

Excluding category from post navigation in Wordpress?

I'm looking to exclude a category from the post navigation. Originally, I looked up manipulating <?php the_post_navigation(); ?> to exclude categories, but a few posts I read (like this) pointed ...
Brittany Layne Rapheal's user avatar
0 votes
0 answers
311 views

Category as Subdomain for One WP Install

Please I need help, I have a blog with already over 80k post (One WP Install). For Person reasons I want to change one of the category to a subdomain. I have searched for a plugin for that and it ...
Godwin Alex Ogbonda's user avatar
0 votes
1 answer
179 views

Single query for multiple categories

I want for my homepage to show 'x' latest posts from certain categories. The number of the posts returned depends on category. Either 10 or 15 posts/category. I want to use a single query to DB to ...
Kostas Arvanitidis's user avatar
0 votes
1 answer
25 views

How can I make a category function as a page?

I apologize if this is a simple question but I'm entirely new to the website-building process. I have no prior experience. That being said, if the answer requires complicated HTML or CSS, then it won'...
Marcus Miguel's user avatar

1
14 15
16
17 18
29