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

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.

0
votes
0answers
10 views

Cannot nest tag links, which is causing problem with a translation plugin

I am currently using the Prisna Translation Plugin for my website https://dkliveseafood.com Currently the plugin works fine and is operating as expected. However when you try to translate in any ...
0
votes
0answers
13 views

Wordpress category URL ?cat=categoryName

I need to change my category structure like this: http://example.com?cat=categoryName but I have no idea how to do it. I have been searching for more than 3 hours but doesn't find any related ...
0
votes
1answer
17 views

How can I create a Category Index page that lists all categories?

I have themed my category.php file so it now displays all posts that belong to the category that was clicked. The URL looks like [www.example.com/category/news/]. This is good and correct. When I go ...
0
votes
0answers
13 views

Echo the first category out of an assigned categories array

I have a lot of posts that I need to assign in multiple categories, usually two but sometimes more than two. The assigned categories is a mix of parent/parent and parent/child but never a child/child ...
0
votes
0answers
16 views

How to add/edit/delete and categories wp-page template files using wp-admin?

Anybody please suggest a good word press plugin for add,edit,delete and categorising the word press page templates according to the pages any plugin is available? I need a suggestion form you peoples ...
0
votes
1answer
18 views

Omit specific product categories from WooCommerce shortcode

I assumed this would be simple, but I'm having a hard time sorting it out. All I want to do is use the standard [product_categories] shortcode from WooCommerce to show all of my product categories ...
0
votes
0answers
19 views

Extend categories with post meta

I have categories on my site, that i need to extend them with posts functionality (post meta and all the stuff i can do with posts) but on the other side need to save their term id. Is this possible ...
1
vote
1answer
23 views

How would I go about pulling the most popular (most used) categories?

I am trying to use WordPress' built in function for calling a list of categories. Unfortunately there doesn't appear to be an argument for how to pull the most popular categories (say top 5). I am ...
1
vote
1answer
22 views

How to get data about category in category.php

I have to make custom category.php template, but how do I get data about category in category.php? I need these: Category name and id Category's parent name and id All category's items Let's say our ...
0
votes
0answers
10 views

Trying to get posts in a sub-subcategory of custom taxonomy

I have a custom taxonomy, which is structured like Cars --Ford --VW Trucks --Ford --Dodge And then I have posts in this post type such as "Beetle" and "Jetta" assigned to the "VW" subcategory and "...
1
vote
1answer
18 views

Why is my loop not dynamically grabbing the correct Category and displaying all categorized posts?

Objective: When a category is clicked I would like the category.php page to dynamically pull in all posts filed under that clicked category. Example: News -> (Action:Click) -> Category = News ...
0
votes
0answers
20 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 ...
0
votes
2answers
16 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' => '...
0
votes
0answers
17 views

Are subcategory pages on a category page made as categories or pages?

If product category pages are "archived," then how do I go about getting a subcategories menu ON a product category page? Should the subcategories be category pages or page pages? I am building an ...
0
votes
1answer
12 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 ...
0
votes
1answer
22 views

Gutenberg editor add a custom category as wrapper for custom blocks

As we know by the provided API from Gutenberg we can create a custom block as const { registerBlockType } = wp.blocks; registerBlockType( 'my-namespace/my-block', { }) but how do I create a ...
0
votes
1answer
38 views

So how to redirect category to a page of the same name if it exists?

So I had previously tested a specific redirect where I knew the page exists. function nepal_template_redirect() { if ( is_category( 'nepal' ) ) { $url = site_url( '/nepal' ); ...
0
votes
1answer
19 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 ...
0
votes
0answers
18 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( '...
1
vote
1answer
25 views

Get category url in loop

I need to get the category url for put it in meta snippets. Now the output inside the span is tag with url. I need to get only the url without tag and put inside $cat_display. I try with 2 options, ...
0
votes
0answers
21 views

How to check login and show the wordpress selected category?

I have to show some of the category page on post login, How do I check the category id = 652 Then User logged in or not details, if the user logged in the page will be display or this page will ...
0
votes
0answers
13 views

Get Manual and Automatic Excerpts Separated

I would like to create an entry and show the automatic excerpts in the archive.php but in my custom php (category-23.php) show the manual excerpt. It is possible to do that?
0
votes
1answer
17 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
0
votes
1answer
17 views

Needing to add a conditional PHP statement for woocommerce webhooks

So in a nutshell I have a code that checks if an item is listed with a price or not on my website. If there is no price, or the price is 0 it currently shows "Call # to Order" My problem is I need ...
1
vote
1answer
31 views

Possible to display shortcode based on the category?

So, aside from creating individual WordPress Category PHP Pages, I'd much rather have a functions.php command that would insert shortcode when a Category has been selected. How would I go about that, ...
0
votes
0answers
19 views

Recent posts widget : how to display only the posts of the current subcategory or category?

I would like to display only TOP 5 latest post from current grandchild (sub-sub category) as my widget. If post have have category + subcategory + sub-subcategory then show only latest post from that ...
0
votes
0answers
14 views

404 on Woocommerce Category Pages, Permalink settings seem correct?

I've looked at the other answers to this issue and they don't appear to quite match my problem. My product and category pages work fine with my current Permalinks. EXCEPT one category, Furniture, and ...
0
votes
1answer
25 views

Image Upload Custom Form Field for Category and Custom Taxonomy

I am currently customizing a Wordpress Theme, and I want to add a new form field on Category for uploading an image. The image should be retrieved from the Media Library. I found out that there are ...
0
votes
1answer
14 views

Query posts that have all the specified tags

I have tried this one for example: $query = new WP_Query( array( 'tag__and' => array( 37, 47 ) ) ); It doesn't seem to work. Am I wrong in thinking that category and tags are the same relative to ...
0
votes
0answers
12 views

Fetch Categories in second level and posts in third level

I want to show the third level categories when the user clicks second level categories in the menu and when the user click thr 3rd level menu in the post's page then usual show the posts. Please ...
0
votes
1answer
12 views

ow to display the number of posts in a category

how to display how many posts in one category, for example I have the category "mywebsite.com/category/blogger", how to display the number of posts (in numbers) in the "blogger" category sorry my bad ...
0
votes
0answers
18 views

“Current page” class to apply only if “is category link”

I have a menu with any link that point to a category page. It's basically a filter but what I want to do is generate a class="current_page_item" to any tag anytime I'm in the current category page. ...
0
votes
0answers
9 views

a vertical menu for categories with a complicate database

I want to create a vertical nested menu from my posts. these posts have some categories. one category is for the province and its cities as subcategories. and another category for type of post for ...
0
votes
0answers
15 views

Accidentally deleted a category in WordPress

Accidentally deleted a category in WordPress , but again created the same but now shows 404 error ! can anyone help me ?
3
votes
2answers
131 views

custom permalinks for category archive ( custom base and no parent slug )

For the default taxonomy i.e category , I want custom permalinks with i) base = "post/c" and ii) without any parent slug For eg: if I have categories cat-a subcat-a1 subcat-a2 cat-b ...
0
votes
0answers
39 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( ...
0
votes
1answer
10 views

Redirect Category pages to blog page with query string

Instead of using category listing templates for a site that I am working on, I am using ajax for filtering, searching, and listing all blog posts on the blog page. However, I need to add all the ...
0
votes
0answers
10 views

Woocommerce product exclusivity

I have a special product that is not in a category (uncategorized) so that it's only available by direct link. This means that it's not in the root product list which is perfect however I'd like to ...
3
votes
1answer
60 views

How do I use the same post slug for different Categories?

I want to use the same post slug for different categories. Because I will have different projects with the same slug. I already have the post slug email. The second slug email becomes email-2, but I ...
0
votes
1answer
83 views

Custom page for WooCommerce's /product-category/

I am building a website from scratch on WordPress using WooCommerce. I'll be having products from numerous brands and to have an easier time organizing them, I've made each brand a category. Currently,...
0
votes
1answer
17 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, ...
1
vote
0answers
25 views

Have different permalinks based on category

I am building my blog, but I want the permalinks to have different structure depending on the categories. Example: cat1 and cat2 are blogs and the permalink should be: domain.com/postname with my ...
0
votes
0answers
27 views

Woocommerce: Display product categories in neat hierarchy

Default, woocommerce product categories in single product pages always display its categories in list with comma in between. How can we make it into bullets or vertical list (like Amazon) or ...
0
votes
0answers
18 views

I need to sort the results of post wordpress search in order of category

I need to sort the results of post wordpress search in order of category. For example Post of category 1 Post of Category 2 Post of category 3 .......... I must be how ? I look forward to receiving ...
0
votes
2answers
298 views

Add “add to cart” button to every product on the category's page

I need to place Add to cart button at every product on the page of certain category as shown below How can I achive this? Link to subject page oma-fintess.com.ua
0
votes
0answers
11 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 ...
0
votes
1answer
16 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 ...
0
votes
0answers
23 views

Blog Posts are not showing up in the Categories on side bar

I have the category widget set up on my sidebar. Each of my blog post have been assigned to their respective categories, but none of them are being displayed when you click on the respective category ...
0
votes
0answers
12 views

Wordpress add meta value and remove post from any loop in the theme

I have a website which imports videos automatically from Youtube. and I have used these codes in (single.php because it's not working in functions.php) to check if the video has been deleted then ...
0
votes
1answer
13 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($...