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

why same category base and single post base don't work?

I have checked a similar question on the site but there was no satisfactory answer? Here is what I would like to accomplish. When I set the permalink structure to '/blog/%postname%/' this gives me the ...
yucelm's user avatar
  • 3
0 votes
0 answers
43 views

Display featured posts first, then display all others within a specific category in WordPress

I want to display featured posts first, then all other posts not marked as featured on a category archive page. I am using a plugin that has functionality to mark posts as featured. I have figured out ...
user1462's user avatar
  • 1,274
0 votes
0 answers
11 views

How To Remove Parent Category from Child Category URL?

Are there no easy way to ensure that the permalinks only have the lowest child-category listed? Do I really need to install a plugin for this or make custom code? I already use RankMath to strip the ...
Kasper Toft Braun's user avatar
-1 votes
1 answer
30 views

Add taxonomy or category slug to custom post types URL

I have created a custom plugin that is similar to Woocommerce but will only manage products that are loaded using the WP REST API in a Vue SPA. I've registered two custom post types, one for products ...
ICTDEV's user avatar
  • 113
0 votes
1 answer
15 views

WP Query filtering by custom category not showing all relevant posts

Here's a question I've been trying to solve all day: I added a WP Query that would show posts from a category that the admin chooses with a custom field. The post is a custom post type called "...
Jillian Hoenig's user avatar
0 votes
1 answer
12 views

Adding content to the top of post's based on their category

I'm trying, but struggling to add a specific div to the top of a post, based on the category it is assigned. For example, at the top of the content, if it's tagged with 'basketball' I want to add ...
shakeshack's user avatar
0 votes
0 answers
28 views

How to edit category/archive page?

Basically I want to customize this page to make it look like this page, however I can only edit text over the featured image with my theme. Is there a way to edit the category/archive page (sorry for ...
Cullen's user avatar
  • 1
0 votes
1 answer
21 views

Show posts assigned to multiple categories in current category page

Whenever I assign a post to multiple categories, the Wordpress website just loads posts from Cat1 only. No error message. My post-assignment method: Post1 - Cat1 Post2 - Cat2 Post3 - Cat1,Cat3,Cat4 ...
user3362364's user avatar
0 votes
1 answer
9 views

Show category name in category.php when posts assigned to multiple categories

I'm trying to show the category name in my category.php but it's not working when I have posts assigned to multiple categories as it chooses the first category. <h1><?php $cat = ...
user3362364's user avatar
1 vote
1 answer
8 views

How do we ReWrite HTACCESS to point a cat/subcat Product URL, to Cat/ only?

We have a problem where a site has got some odd URLs indexed by Google. This is the incorrect path: example.com/shop/mens/jeans/jean-product/ This is the correct path: example.com/shop/mens/jean-...
Simon_a6's user avatar
0 votes
0 answers
13 views

Category archive page redirects to home page

I have a multisite setup, any attempt to load /category/news or suchlike simply redirects to the home page. This is true for all categories. in the case of the main sub-site it appends /wordpress (...
Chris Pink's user avatar
0 votes
0 answers
12 views

WP-PageNavi not working on category.php

It is working in another page I created where it shows all the posts, but not in category.php, where it shows only the posts of the specified category. It only shows the first page, the second onward ...
Now Playing's user avatar
0 votes
0 answers
9 views

How to query by subcategory and, if there are fewer than 10 posts in that subcategory, fill out with posts from parent category

I want to query all posts by subcategory and, if there are less than 10 posts in that subcategory, I want to return posts from the parent. If there are still not 10 posts, I want to fill out the ...
user18102663's user avatar
0 votes
1 answer
11 views

change the listing type of categories block?

How ist it possible to display the categories in the sidebar ( cat. block ) like this: cat1, cat2, cat3 cat4, cat5, cat6 and NOT cat1 cat2 cat3 cat4 cat5 cat6 Can you help ? THANKS in adv. best wishes
John Mclaine's user avatar
0 votes
0 answers
10 views

Query for posts belonging to multiple categories

Within the default Post categories I have A parent category Cities -- City A -- City B -- City C A parent category Beauty -- Hairdressers -- Pedicure A parent category Sightseeing -- Archeological -...
Brecht Schoeters's user avatar
1 vote
1 answer
24 views

Using same term for slug and category

I am having problems with a site that uses the category “vacatures” for posts. The “Vacatures” page, lists those posts. Some time ago the client has made a page called “vacatures” and replaced the old ...
andre's user avatar
  • 21
1 vote
0 answers
104 views

Wordpress Custom Post Type Archive, filter by category and get pagination working

I have created 9 different Custom Post Types via ACF and an assortment of custom field blocks for 8 of them. Those 8 are used to create different content, based on requirements for each post type. The ...
Mitch S's user avatar
  • 27
0 votes
0 answers
42 views

Python rest api post article, update problem

I searched about how to post new article by python. and it worked. Here is sample of my code res = requests.post(urljoin(WP_URL, "/wp-json/wp/v2/posts"), data=json.dumps(...
신동혁's user avatar
0 votes
0 answers
12 views

Category display using conditions

I have a custom post type(events) created and has taxonomy(event-categories) with parent and child categories. Since im not good in coding, i will try to understand all the help from here. So what im ...
Bordzee's user avatar
0 votes
1 answer
22 views

Exclude category in widget through child theme

I desperately try to exclude categories through following snippet in my functions.php of my child theme: <?php //https://developer.wordpress.org/themes/advanced-topics/child-themes/#how-to-create-a-...
Rob's user avatar
  • 1
0 votes
0 answers
14 views

Separate archive template to show posts and CPT by same category/taxonomy

I have archives for posts and another for reviews which are working fine, try as I might though I'm struggling to have a separate archive under the URL /content/[category] that pulls both posts and ...
james's user avatar
  • 1
0 votes
0 answers
21 views

Help with get_categories code

I have listed the following code below, and where it is pulling the sub-title into the banner I need to change this to pull the category of the linked article instead. This is the link to the website ...
Richard Pearson's user avatar
0 votes
2 answers
51 views

Display posts in a random order for a specific category

How to show posts in a random order when an archive of a certain category is being showed like as example: mysite.com/category/name-of-specific-category? I have searched everywhere but could not find ...
Renato Gelforte's user avatar
0 votes
0 answers
17 views

Disable Category Link

I need some help to disable my category pages and make them not clicable. I need to disable those 2nd level slugs from going to another page.I just want them there for structure reasons, no need to ...
user22446164's user avatar
0 votes
0 answers
26 views

Is it possible to go to the next post in the same category?

Is there someone who can help me to change the code so the button goes to the next post in the same category? TaaaaannnnnXXXX <div class="nk-pagination nk-pagination-center"> ...
Jasper Stamm's user avatar
0 votes
1 answer
22 views

Wordpress converting ' to ’ and - to –?

When I create a post (or whatever) in wordpress if i type - wordpress converts it to – on site for public users. as you can see left one is bigger than right one (i added right to just show what i ...
Maria's user avatar
  • 1
0 votes
0 answers
15 views

Add a category to posts, that DO NOT contain two specific keywords?

i'm a little bit underwhelmed. I use mostly plugins for everything but i think there is none that does that job. I'm looking to add a category (ID 18663) to posts that do not contain two specific ...
gooloode's user avatar
0 votes
1 answer
31 views

Can Multisite and Custom Post Types work this way?

I'm running a WordPress multi-site, where i have created a custom post type which have 5 different categories on main site. now i want to display data (posts) of those 5 categories on multi-sites 5 ...
Chandresh Tiwari's user avatar
0 votes
0 answers
16 views

Sort WooCommerce categories automatically into friendly-looking tree

have a problem, I've uploaded bunch of products into WooCommerce store via XML file. Something like 45,000 products and xml didn't had certain category for every product, instead it had meta tag with ...
Tim P's user avatar
  • 1
0 votes
1 answer
67 views

Mismatch between posts count and actual list in admin posts page

I have an issue in the *Posts* page in the admin area; more specifically, I see that there is a mismatch between the posts count and the actual list shown, when the posts are filtered by category: the ...
DamianFox's user avatar
0 votes
2 answers
91 views

Error while add Category or Tag in Wordpress

When I want to create a new category or tag on the Wordpress site. I encountered this error. Empty Term. As usual, My theme and Plugins are updated. I disabled all plugins. The error was not resolved. ...
Pouya Zehfroush's user avatar
0 votes
0 answers
42 views

How can I filter the post using parent category and child category in admin list in Wordpress

I need to make the two dropdown 1. parent category and 2. Child category. When user select the parent category, only child of that category will be displayed in second dropdown and after selecting it, ...
Radheeka Chopda's user avatar
0 votes
0 answers
13 views

Adding Product Categories to Product Categories pages

I am trying to add product categories side bar to my product categories pages An example of my current setup. On my shop page I have a little product categories section that displays all the product ...
Michael Davids's user avatar
0 votes
0 answers
35 views

Display posts on category archive organized into subcategories?

I have been trying to achieve this as part of a WordPress theme, where users can assign a FAQ style template to a Post category of their choice, which is then organized into subcategories for easy ...
Jesse Nickles's user avatar
0 votes
0 answers
28 views

Menu for all posts from multiple categories

This seems like a basic question but I couldn't find answer anywhere. I have 300+ posts and 15+ categories on my website and I'm unable to create a menu to link to all the posts from all categories. I ...
Nikita Gupta's user avatar
0 votes
2 answers
36 views

Link from page to category posts

I'm stuck and grateful for any help I have a number of categories and a site 'about' page I also have 'about pages' for each of the categories (sort of subject intro pages) The about pages are all in ...
PLinB's user avatar
  • 3
0 votes
1 answer
32 views

WordPress dynamic select with category and authors

I need to create two dynamic selects with PHP code to put in the functions.php file. For the categories I'm using the following code which works great: /* BLOG DYNAMIC CATEGORIES SELECT */ function ...
enaion's user avatar
  • 1
0 votes
1 answer
75 views

Wordpress add menu items display slug too

Using the Wordpress menu system to add an item (product category in my case). I have categories with the same name, under a different parent category, so when i search for the category i want it may ...
John's user avatar
  • 101
-1 votes
1 answer
71 views

How can I display the category descriptions below the category name using a functions.php filter?

How can I display the category description below the category name by modifying the theme functions.php with a filter?
msch382's user avatar
0 votes
1 answer
23 views

WordPress Related Posts by Title and Category

How to display related posts according to Title and Category on a WordPress single page? Here is my code: <?php $args = array( 'category__in' => $cat_id, // OK ...
Aminul Islam's user avatar
0 votes
1 answer
33 views

Excluding a category from frontpage but not from WP_Query

I am successfully using this functions.php snippet to exclude category 3 from the WordPress homepage: function exclude_category_home( $query ) { if ( $query->is_front_page ) { $query->set( 'cat',...
joxyzan's user avatar
  • 13
0 votes
0 answers
16 views

Using categories and tags

I want to create a directory. The categories are the niches. the sub category of each niche are the cities that have those niches in the state. So for example in California, say we have chiropractors. ...
Rich's user avatar
  • 1
0 votes
0 answers
9 views

Show previous product category when entering subcategory with last level - Woocomerce

For example : A A.a A.b A.c A.c.1 A.c.2 A.c.3 Currently I am displaying the child product categories of the current parent product category. I want to show previous subcategories when entering ...
duyrom's user avatar
  • 1
0 votes
0 answers
154 views

How to remove the category from the url only for a specific category of articles on wordpress

I'm using a permalink structure like this on a wordpress : /%category%/%postname% But i'd like a category of articles to appear without the prefix /%category%/ ex : right now it's appearing like that :...
Isisky's user avatar
  • 1
0 votes
0 answers
9 views

Display Link to Category out of X Categories

My first question ever ;-) I have X Categories and I want to display the Link (with the name) but only if it is out of a list of Y Categories. So the code I am looking for is like this: Show Link but ...
ft4zlllnkjnkj's user avatar
0 votes
0 answers
49 views

Exclude a category ID from the following function

I've used a query that will query if the post in a specific category, to show a list of subcategories it belongs to. The problem I'm having is I also want to exclude a specific subcategory from the ...
Emma's user avatar
  • 11
0 votes
0 answers
11 views

Get the category of post from which category page it have been clicked

Look i have category1,category2,category3,category4. Some post have got more than 1 category. If the post is opened from category1 page i want the link and name of category1 page. If the post is ...
Shubham's user avatar
0 votes
0 answers
21 views

Add custom text in second paragraph of posts in specific category

I am trying to display following custom text in the second paragraph of each post lying under category 'Blue Screen' (cat_id 128133): Helpful tools to research and fix: BlueScreenView Whocrashed ...
SK21's user avatar
  • 17
0 votes
0 answers
17 views

How to add categories to a custom post type using wp_insert_post($new_post);

I have a custom post type 'memberfile', and a function for users (members) to upload files. Uploaded files are automatically posted as a 'memberfile' post in the backend. In the form for uploading the ...
Bart's user avatar
  • 1
0 votes
0 answers
32 views

Hierarchical outline of posts

Is this possible? -- Hierarchical outline / menu (preferably not in nav) that helps visitor find their way through ~200 articles, organized into Topics / Sub-Topics / Sub-Sub-Topics / Articles. A ...
Lee's user avatar
  • 1

1
2 3 4 5
96