Tag: Theming

Child Theme Doesn’t Look Like Parent Theme? Here’s The Fix

Child Theme Doesn’t Look Like Parent Theme? Here’s The Fix

You have just created a WordPress child theme. You followed closely the guide found on WordPress Codex as well as on WordPress developer theme handbook. But there seems to be a problem. Once you activated your child theme, it doesn't look like its parent theme. Shouldn't a child theme inherit everything from its parent theme? If so, why doesn't your child theme look exactly like the parent theme? Here's what to look for in order to fix this. There are two things you should check first: Have you copied custom css, widgets, theme options and configurations (including what you customized using WordPress customizer) from the parent theme over to the child theme? Have you successfully enqueued all the parent theme's stylesheets and set their dependencies (such as font awesome, bootstrap, etc) accordingly? Okay, let's go through all the above one by one. #1: Copy Parent Theme's Options Over To Child Theme Most WordPress themes these days have their own theme options page where users...
Read More
Get Woocommerce Current Product Category In Single Product Page

Get Woocommerce Current Product Category In Single Product Page

First of all, Woocommerce products are stored on WordPress as custom post type (CPT) named 'product'. The product categories are custom taxonomy named 'product_cat'. Let's say you want to show a simple line of text that tells your visitors the shipping flat rate of a product, and you have different rates for different product categories. For an example, you have two different product categories in your shop, which you named them as tshirts and hoodies. Tshirts have shipping flat rate of $10.00 while hoodies have flat rate of $15.00. This is how you check for current product category (either tshirts or hoodies) on a single product page. This is used inside the loop. [crayon-5b72b9586c790741705004/] That's it!...
Read More