Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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.

2
votes
1answer
16 views

Categories - create a new separate set right after the default?

Is it possible to create a new set of categories right after the default set of categories? For example, in the WP admin area, this is what we see and get by default: Pages - All Pages - Add New - ...
1
vote
1answer
16 views

prevent showing posts of an specific category in admin posts section

For some purposes I made a plugin that automatically makes posts with a specific category. Now in admin posts section, posts with that specific category have been too plentyfull and finding other ...
5
votes
2answers
42 views

How to remove the term “category” from category pagination?

For example, I have a category /wiki/ https://buhehe.de/wiki/ It has removed the term "category" from the URL, but please see: https://buhehe.de/wiki/page/2 It doesn't show the second category page,...
0
votes
0answers
25 views

How to combine url with category and where to find the filters name?

My need is to create manual urls with category combinations... I'm trying a lot of urls but I don't succeds to make category combination appear. I'have always not found page 404 error. I don't know ...
0
votes
0answers
17 views

Remove 'Category:' from browser tab title

I have a bunch of pages on a site that aggregate posts organised by category types, e.g. https://www.clareshort.org/speeches, https://www.clareshort.org/interviews. I have used the following, ...
0
votes
1answer
19 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 ...
0
votes
0answers
13 views

Display all categories with description in out side loop?

<?php // Get top level categories and list them $args = array('orderby' => 'name', 'parent' => 0); $categories = get_categories( $args ); foreach ($categories as $category) { echo $...
0
votes
3answers
24 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 ...
0
votes
2answers
40 views

Display post number by category

I try to add auto increment post numbering by category. Like cat="myID" > post 1, post 2, post 3... Display post number not post ID number In find this solution, and use post_meta looks a good way. ...
0
votes
1answer
33 views

How do I output all category with custom field?

I want to list my custom field category. I'm using the Advanced Custom Fields Plugin in my project code. I want to combine the project code with the category links code together so The image and text ...
0
votes
1answer
15 views

How to hide posts of a specific custom category in Wordpress?

I have 2 custom post types on Wordpress website - Location and Event. Location is connected with Event as meta data (for sorting). For example: some event (Event post type) is taking place in London (...
0
votes
1answer
25 views

Apply Wordpress function on specific woocommerce product categories only

I have the following function which I need to apply on a particular category only: function ChangeSelectTitle($woocommerce_product_categories_widget_args){ $...
0
votes
3answers
37 views

Weird problem happening with custom taxonmy when creating/updating posts

I have created a custom post type as well as a custom taxonomy, however when I added my first item and selected a category/recipient something weird happened, it automatically created an additional ...
0
votes
1answer
12 views

How to load terms of a custom taxonomy of a product in woocommerce cart page

I have created a custom taxonomy called "job_orders" to a products in woocommerce. I want to edit cart page and show then terms of job_orders inside cart table. currently I'm using the below script ...
0
votes
1answer
22 views

Exclude category from sitemap Yoast Seo [closed]

Yoast recommends this to exclude a category from their sitemap_index.xml but it is not working. /* Exclude One Taxonomy From Yoast SEO Sitemap */ function sitemap_exclude_taxonomy( $value, $taxonomy )...
0
votes
2answers
23 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 = ...
0
votes
0answers
16 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, ...
-1
votes
1answer
22 views

Can i know if it is Category first page or 5th?

Can i know with pre built wordpress function if it is category's first page or 55th page? For examle first page is mydomain.com/games/ and 5th page is mydomain.com/games/page/55/ CAn i determine it ...
0
votes
1answer
75 views

How to seperate posts by categories?

I have CPT called "investment" and I want to display all the posts in that CPT by it's category. I'm doing that via shortcode. e.g. [myshortcode type_of_post="investment" cat="12,30"] and I want it ...
0
votes
0answers
16 views

Woocommerce Product Categories

i use a wordpress theme and this has some custom types products categories like Hotels, Tours e.t.c. This theme connected with woocommerce and if a cliend choice a hotel then send this product as ...
0
votes
1answer
26 views

display a widget on specific category and its sub categories

I'm not good at wordpress coding. but i want to display a widget on specific category with its sub categories and all child posts. Is there any simple way for this purpose ? I found out the "Widget ...
0
votes
1answer
21 views

wordpress categories and subcategories

I have a taxonomy(product-category) and i have a page template that shows all categories , i want that when click on a category if it has sub categories shows them in archive page and if don't have ...
0
votes
1answer
31 views

show all WordPress categories in a page

I want to show all WordPress categories in a page. I use this code: <?php $categories = get_categories( array( 'orderby' => 'name', 'order' => 'ASC', 'exclude' => '1,116', ) ); ...
0
votes
1answer
21 views

Multiple selection for wordpress widget

I created my own category selection widget. So i used <select> but i want to use with multiple attribute. Here is my widget class. It works perfect without multiple attr. But i want to use it. ...
0
votes
0answers
7 views

Create Filtered page for category

I want to create a filtered page for a category, to make google index it. I'm making a recipes blog. My need is to create a "recipes with" and a dinamic category with ingredient. So "recipes with ...
0
votes
1answer
14 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 ...
1
vote
1answer
43 views

in_category() not working in WordPress 4.9.7

I have the following code in a template that used to work until I upgraded to Wordpress 4.9.7 if (in_category( 'vid' )) { $vidliclass = ' class="vid"'; } else { $vidliclass = ''; } Since the ...
0
votes
1answer
11 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 = ...
0
votes
0answers
25 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 ...
1
vote
0answers
34 views

Select posts by name and category per REST API

I have a site with a form, the form has 3 inputs. One takes a number, another a date, and another a select option. I made posts with categories from this select. How could I search on click of the ...
0
votes
0answers
11 views

Product Subcategory Displaying Twice

Have a page where there are parent categories, when you click on the parent category it shows the child/subcategories but when you link a product to a subcategory that subcategory displays on the same ...
1
vote
1answer
24 views

products nested by subcategories in a current category archive

I am able to get a list of its subcategories in a category archive page using below code in archive-product.php but I want to display the list of the products currently assigned to each subcategory. &...
1
vote
0answers
15 views

Categories for each brands

I have searched for hours but could not find an answer to this, or a module to help. We are building a store and our client needs the ability to navigate the store by manufacturer. Is there any way ...
2
votes
1answer
23 views

Deleting All tags except categories Wp database

Please Is there any way to run an SQL code to delete all post tags in wordpress except categories via database. I want to run an sql code that will delete all my tags in wp, but not deleting my post ...
1
vote
1answer
27 views

Get multidimensional array that reflects category hierarchy

The title say pretty much everything. How is it possible to get a multidimensional PHP array of WordPress categories that is reflecting the given category hierarchy.
0
votes
0answers
28 views

REST API: Display Category names in JSON?

Using the Wordpress REST API, I retrieve all my posts into a Angular 6 service. The category field in the JSON displays the ID of the category as an array of numbers. "category": [ 6 ], Is there a ...
0
votes
0answers
31 views

Hide category from sidebar

I'm using "Recently Viewed Posts" widget for my website showing what visitor recently visited post/page. By default the widget shows all the category posts from the list. I need a way to hide a post ...
1
vote
1answer
20 views

Multiple categories PROBLEM and Duplicating main categories

I'm quite new to this website stuff, still learning, but I am really confused on these problems. Firstly, my website is a shop. When I try and place a product into multiple sub-categories, the ...
1
vote
1answer
17 views

Category specific web push notifications

I want users to receive notifications from new posts only in specific categories that they choose or in the category they are in.
1
vote
0answers
19 views

Custom User-Created RSS Feed

I have a WordPress site with nearly 10k articles and 90 categories. I'd like to be able to give our visitors the ability to select a number of categories from which a custom RSS feed would be ...
4
votes
2answers
90 views

Why is per_page not working with categories in WP API?

To start I've been searching through several questions and documentation pieces but it seems with WordPress' v2 many of the old questions are no longer valid. What I am trying to do is get all posts ...
0
votes
1answer
30 views

Page + Custom Post Type with same category

I'm trying to display a page with related posts (FAQ) within the same category ID. Currently it displays all custom posts, but with different categories. As an example: - Page has a category ID '4'. ...
0
votes
1answer
23 views

Show all tags within a category?

How can I display a list of tags within a category page? So my URL would look something like this. https://example.com/category/tag Then it would display only posts from that category, and that ...
1
vote
1answer
13 views

Remove 2 categorgies when post status changes from private to publish

I cannot figure out why this code won't work as an array: function remove2categories( $new_status, $old_status, $post ) { if ( $old_status == 'private' && $new_status = 'publish' &&...
1
vote
1answer
18 views

Unset Category if other Category is unset during post transition

I am trying to unset a category if another category is unset. First i have a function that add's category if another category is set such as: function add_category_automatically($post_ID) { ...
0
votes
0answers
14 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 ...
1
vote
0answers
7 views

Query posts intersecting tags and categories

if I have category 'catname' and tag 'tagname' is it possible to visit for example site.ext/catname/tagname and query all posts that are contained in specific category 'catname' and specific tag '...
2
votes
1answer
51 views

Duplicate Category and Page URL loads Category instead of the Page

I have created a Category with the slug service, which has the permalink: https://example.com/service. and a Page with the link: https://example.com/service. In the Category service, there is a post ...
1
vote
1answer
34 views

How can I remove posts of a certain category from homepage after a specified time period?

I would like to know how to remove posts from a certain category from my homepage after a certain time period (but not expiring the posts). My site is currently set to display my latest blog posts ...
0
votes
0answers
19 views

How to display posts based on user chosen categories?

In Quora we see the posts based on user selected preferences of categories. Is there any way in wordpress with which can display the blogs or posts based on the user selected categories. For ex: ...