Articles of categories

Include WooCommerce product to all child categories

I need to include some of my products in all subcategories of category Auto. For example – product Wheel must be in all subcategories of Auto, e.g. Audi, BMW, Mercedes, etc. How to do this without manual choosing of all subcategories?

Posts from a category on homepage with category archieves page default css

I am trying to accomplish something. First am using two themes on my blog, on the mobile theme which is carrington, i would love to add five posts from a certain category or tag for example “Tech” to the footer of the theme or immediately after the recent posts. Update: what i think am trying […]

Custom Post Type Archive Page Filtering

I have a custom post type with a hierarchical custom taxonomy. The taxonomy has several parent terms and each parent term has several child terms. The posts are assigned to one parent and (mostly) one child. I want that my archive page{cpt_slug} only displays the parent terms. After a first selection, the user will […]

How do order product categories – on a parent category page – in Woocommerce?

I am using Woocommerce with WordPress. Woocommerce allows you to create product categories. In addition You can set all those categories to have a specific parent category. That way you can go to the parent category page and display all the categories with an image and title. I have done this. But the order of […]

category hierarchy level as a body class – parent cat =1, child cat=2, grandchild=3

I’m finding this next to impossible to find any info on. I’m looking for a way to assign each category level a number and then add that number to the body class. e.g. the parent category archive would show the class .catlevel-1, whereas the child category archive would show class .catlevel-2 … and so on.

Get next post in same category not working WP 4.7.4

I have posts which assigned 1 of 2 different categories. On the single post view i want to show a next and previous link of posts with the SAME category. This should be straightforward, i’ve tried using get_previous_post etc but i cannot exclude posts assigned to the other category. I’ve tried $prevPost = get_adjacent_post(TRUE,’129′,TRUE); where […]

MySQL Query to Retrieve Category from wp_posts

Using this query to retrieve all of my posts with a specific post_type SELECT * FROM wp_posts WHERE post_type = ‘product’; As described here the category is not in the wp_posts table but in term tables wp_terms wp_term_relationships wp_term_taxonomy Searching through all the tables for a category I had in mind, the only instance of […]

Specify multiple categories for custom post template – FATAL ERROR

I am using this code below to specify a post template for a specific category in my functions.php file. function get_custom_cat_template($single_template) { global $post; if ( in_category( ‘ms-conversations’ )) { $single_template = dirname( __FILE__ ) . ‘/CUSTOM-POST-BLOG-POST.php’; } return $single_template; } add_filter( “single_template”, “get_custom_cat_template” ) ; The code technically works, however I need to specify […]

Category page not showing

I installed wordpress 4.7.3. After that I created one “Test” category. After that I created one post and assigned to that “Test” category. Then I go to front end, in the right menu and clicked on “Test” category. Then it shows page with text “OOPS! THAT PAGE CAN’T BE FOUND.” “It looks like nothing was […]

Custom Post Type posts not showing in category

I created several Custom Post Types and I also created a category too. I assigned several custom posts to that category and I tried to call it to display the posts in home page, but it’s not displaying anything even though it’s displaying posts from the Posts in wp dashboard menu. Here’s my code in […]