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
13 views

Twillio Send SMS Published Post

I followed the Twilio tutorial on sending an SMS when a post is publsihed. It works, but any time you make a change to the post and update, it sends another SMS. Can anyone point me in the right ...
0
votes
0answers
13 views

In if…else condition, the else statement shows even if if statement is correct

Will please someone help me why this happens. Firstly here is my code. add_action( 'woocommerce_after_add_to_cart_form', 'sione_enquiry_button' ); add_action('woocommerce_cart_actions', '...
-1
votes
0answers
18 views

How to add a Page Builder to Category Pages?

I am currently working on a personal blog, which is made up of a variety of Parent and Child Categories. At present, both Parent and Child Category Pages are made up of just Blog Post Archives. ...
0
votes
0answers
12 views

How to show WooCommerce Categories on 'shop' page instead of products?

Setup I am running: WordPress 5.4.1 WooCommerce 4.1.1 I am writing a custom theme that overrides some of the WooCommerce templates by placing my own templates in: themes/my_theme/woocommerce/...
0
votes
0answers
10 views

WooCommerce Category page uses Single.php

I'm using WooCommerce on a custom theme and currently all categories pages for it are using my single.php file. Why would this be? I assumed it would use archive.php Is there a good way to fix ...
0
votes
1answer
21 views

Show the parent taxonomy by creating shortcode in woocommerce?

How would I create a shortcode to show the parent taxonomy in woocommerce? My product categories should be like: - Food -- Fruits --- Healthy Fruits --- Organic Fruits -- Meat --- Pork --- ...
0
votes
0answers
29 views

What plugin would make this happen? If is the theme

Update: My Responsive Version 1.9.3.6 has a bunch of custom post and page templates. When I update it to Responsive Version 4.3.6. I lose all the templates. Any ideas on how to keep the templates ...
1
vote
0answers
19 views

Removing post category base giving Error 404

I have a WordPress website and i am dealing with a very rare kind of issue. I want to change my base category for blog posts:- My current post url is https://www.example.com/media/press-release/...
1
vote
1answer
10 views

Grab posts by multiple categories

So I have the below code that works great: if (isset($meta_field['category'])) { $post_data = get_posts_by_category($meta_field['category'], 0, $post_limit); } else { $post_data = ...
0
votes
1answer
26 views

Replace deprecated get_category_children code with get_terms

I've been using this piece of code for years on one of my websites: <?php if (is_category()) { $this_category = get_category($cat); if (...
0
votes
1answer
29 views

Display the articles of a category by role

In our intranet we have 120 locations => 120 groups => 120 Categories and 120 authors. in the home page we want to display a carousel, where we will show post's titles (with link) according to the ...
0
votes
0answers
7 views

Custom category taxonomy links for woo-commerce products

I am needing my woocommerce meta/taxonomy links to output in a specific way, the following code is pretty much the closest I have found/gotten: $taxonomyName = "product_cat"; $parent_terms = ...
0
votes
1answer
15 views

The Difference Between Categories and Tags and Taxonomies and Terms

I've got a custom post type 'articles' and I've added a custom taxonomy 'articles_categories' which has its own terms. I was under the impression you can't have categories and tags on custom post ...
0
votes
1answer
16 views

How to list all subcategories from all categories but not from a certain category

I know how to list all subcategories from a certain category, but don't know how to list all subcategories from all categories. For example, here is category: Category 1 -Child Category1 -...
0
votes
0answers
28 views

WordPress Ajax - Filter Posts by Category

I'm having trouble getting this Ajax tutorial to work - if anyone is able to help me figure this out it would be much appreciated. I followed the instructions step by step and have gone over the code ...
0
votes
0answers
12 views

Should I use 'tag', 'cat' and 'tax_query' parameters together in a WP_Query?

What I'm building I'm developping a plugin. I'm currently filtering the posts by tags and categories (tag and category_name WP_Query parameters) with values given in a shortcode. I want to add the ...
0
votes
0answers
18 views

Output custom woocommerce category and tag links

Im trying to output woo commerce categories and tags in a kind of specific way, I want to essentially create a list of child categories and tags in a similar style to how woocommerce does ...
0
votes
0answers
8 views

Pass Category Name, Description and Photo into variables to pass to jQuery

Currently I'm trying to get the category description by ID so that I can use it in jQuery. I'm finding jQuery will only let me use echo $variablename and not the usual echo that can display the ...
0
votes
0answers
19 views

How I display category, subcategory and posts

The code below shows the subcategory when I click on the category. But I am not able to show the posts when I reach the last level of the subcategory. How do I do? <?php global $cat; $...
0
votes
0answers
15 views

Remove “Category:” from Post meta

I need to remove the word "Category:" from in front of the actual category name/link. I have checked every answer here and on other sites, and none of the answers work on my site...I have tried many ...
0
votes
0answers
9 views

I want to add a drop down of city and state in blog section?

I want something like this using which blogger can select the state and city? how we can achieve same functionality
0
votes
1answer
16 views

How to change category id on get_posts array

I am making a carousel for my AMP page, and I want to re-use the code, so I made it into a template, however, I am having the problem with changing ID on the array for category value, I would like to ...
1
vote
0answers
14 views

Send push when new post is published in a certain category

I'm trying to develop a plugin which send a push notification to an app users, when a new post is published on a certain category. I'm trying with the hook save_post, but when the hook is fired, the ...
0
votes
1answer
6 views

Is it possible to have a template that works on multiple categories where the link address contains the specific category?

This question is for a very specific refinement on the use of WordPress template files. The refinement would work similarly to how default archive.php and variants work, but we would like to have a ...
0
votes
1answer
18 views

On the online version of my blog posts disappear

I lose posts after a few weeks. So as of today there is a gap form April 14 to March 17. Do you know what happens. how can i rectify it? And then there is a gap
0
votes
0answers
8 views

How to show related post with category DESC (ASC) IDs of ID current post

I have example Post 1(id-1), 2(id-2), 3(id-3), 4(id-4), 5(id-5), 6(id-6), 7(id-7), 8(id-8) ,9(id-9)... with same catergory. When in post 9, i need show related post 8, 7, 6 When in post 8, i ...
0
votes
1answer
7 views

Identify a single category and output some code on an archive page

I'm trying to add some code to an article in an archive page based on its category. I want to add a lock icon to each restricted content item for the category 'members' I've tried different pieces of ...
0
votes
0answers
11 views

How to get Custom Field from Category in checkout Page

I would like to get Custom Field from checkout page I used below code for add extra field to category and use this to get the date echo $productCatMetaTitle = get_term_meta($term_id, 'wh_meta_title',...
0
votes
0answers
13 views

create a “add icon” field in taxonomies page

Similar to this post but not quite, I have a Wordpress theme with free Fontawesome already installed and I wish to add a field in the "create Categories" box where I could type in and choose an icon ...
0
votes
1answer
25 views

How to get subcategories from category slug?

So I have this category structure - Recipes |-- Asian Food |-- Chinese Food |-- Japanese Food |-- Taiwanese Food |-- etc... |-- European Food |-- etc... ...
0
votes
2answers
58 views

wp_query is showing posts from other categories

I am trying to make a custom loop that will display the latest 5 posts from select categories, all using a single query. I want the loop to display the category name followed by the 5 posts, and then ...
0
votes
0answers
8 views

Category custom post type admin dashboard

I use the plugin to create custom entries and the taxonomy of CPT UI and use Categories (WP Core) for the category, but when I open the entries, I don’t have a category list on the side where I can ...
0
votes
0answers
12 views

/wordpress/category/news/ not found

I am new in WordPress. So I created some posts and added a category (news) My posts are all in the home page and looks like that So when I click on news I get redirect to /wordpress/category/news/ ...
0
votes
0answers
11 views

How to create tags automatically based on category and location?

hope you are all doing good, as i am running listing site on wordpress, so the creation of tags manually would be tedious as I have a lot of categories and locations (taxonomy), so need to automate ...
0
votes
1answer
14 views

add woocommerce archive description if exist

i want show category description on my archive product page i add this code to my template: <?php if ( category_description() ) ?> <div class="myproductdescription"><?php echo ...
0
votes
0answers
9 views

Query for all the posts NOT in the current archive

For an archive showing Category B, I want to build a sidebar that shows all the posts that are NOT shown in the archive (Categories A, C, and D). This is for a general archive template, so I ...
0
votes
1answer
37 views

Can't display posts by filtering categories using isotope.js

I am currently building a wordpress theme using the isotope.js script which allows you to display articles on the same step by filtering their categories, I struggled a lot and I still can't get the ...
0
votes
1answer
16 views

if in category but only with post meta

Working on an if statement to display text only if it's in a specific category WITH specific post meta. If the post meta doesn't match but it's in this category, the text should not display. This is ...
0
votes
0answers
10 views

WooCommerce - list products AND subcategories together in a-z order. Possible?

in a website i am creating (not live yet) i have products in a main category. I also have subcategories that have other products in them. I know that WooCommerce can display subcategories and ...
0
votes
0answers
7 views

Can a Woocommerce product category URL contain “&”?

I am trying to display a product archive page and the product category slug has a "&" in the title but it doesn't work. I understand the & is used to do URL queries and works as a sort of ...
0
votes
0answers
10 views

WordPress: SQL query to set TAG or CATEGORY if 1 or more words are written in post_title

SQL I need to set the TAG or CATEGORY in a post if there is a keyword in the post_title. Eg: IF "abc" word in post_title THEN set post TAG to "zzz" or IF "abc" word in post_title THEN set post ...
0
votes
0answers
11 views

Set post categories to include parents when setting child category

I have a WooCommerce setup and when I create a new product, I assign the product a category as normal. Clothing - Womens -- Accessories - Mens -- Accessories <-- assigned to this term What I am ...
0
votes
0answers
11 views

how to get posts from dynamic category with wpbakery page builder post grid

I use Zephyer theme and I created a custom content template and I want to show posts from a dynamic category name . In default settings of wpbakery page builder post grid I can't set dynamic value ...
0
votes
0answers
16 views

Spinner doesn't go away on saving new Category/Tag, although request returns status OK (200)

I am building a new wordpress theme. I noticed when I create a new category/tag and hit add category/tag button in wp-admin. The spinner doesn't go away and it keeps rotating. I have checked in ...
0
votes
1answer
18 views

How to get post with associated categories and tags names instead of ids with rest api?

When i retrieve a post from rest api i have the following response : { "id": 2598, "date": "2018-10-15T06:20:10", "modified": "2019-05-16T23:35:50", "slug": "lorem-ipsum-dolor-sit-...
0
votes
0answers
9 views

WooCommerce Product Category

In my WooCommerce product sidebar widget I need to hide all the Product Categories expect the current one and the relative subcategories (children). Can someone help me? Thanx
0
votes
0answers
13 views

How to give pages priority over any product category

Great community, very useful! I have a problem which I can't solve. Found a couple of articles online, but not really the solution. Problem: I have duplicated slug&urls for product category's ...
0
votes
1answer
21 views

Get a list of categories, separated by / to display inside the <header> for custom metatags

I hope someone can help me with this. I needed to create a custom metatag to add inside the HTML header based on the post/page categories. For example: <meta name="custom-category" content="...
0
votes
0answers
14 views

How to organize Backend by Category instead of Post Types?

i've made a lot of different Wordpress-Websites but my new Project kind of frustrates me. It's a Website for a Sportsclub with several departments. Each department has "News", "Teams", "Shedules" and ...
0
votes
0answers
15 views

Sort products by category name

I would like to sort my catalogue by category name. Some of my products have the category "top" that I would like to be displayed at the beginning of the catalogue. There's also already a sort by date ...

1
2 3 4 5
89