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.

That’s it!

How To Override Buddypress Template Files

buddypress-logo-small

On Woocommerce, you override Woocommerce’s default template files by creating a directory called ‘woocommerce’ inside your WordPress theme folder and placing all the template files inside that folder (preserving directories structure).

So is there a way where you can do a similar thing with Buddypress in order to customize how Buddypress looks on the front end? Luckily, there is.

The process is very similar. This is what you do:

1. The first thing to do is to have a folder named ‘buddypress’ in your WordPress theme root directory. With Buddypress though, you can also use the name ‘community’ for the directory instead of ‘buddypress’. Use whichever you prefer, but make sure there is only one exists at a time.

So your directory will look something like this:

/wp-content/themes/awesome-theme/buddypress/

OR

/wp-content/themes/awesome-theme/community/

2. Now, all the Buddypress template files are located inside the following folder in the Buddypress plugin:

/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/

Everything from here on is just like how you override Woocommerce template files. You copy the files inside the directory above into the ‘buddypress’ or ‘community’ directory you created in #1.

Example:

Let’s say you want to customize some text on Buddypress member registration page, you will be copying the file register.php which is located here:

/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/register.php

into here:

/wp-content/themes/awesome-theme/buddypress/members/register.php

Now edit the file as you like.

ThemeChilly’s HostChilly V3 Theme Review

hostchilly

Theme being reviewed: a WordPress theme named HostChilly V3 by ThemeChilly. The theme was designed for web hosting companies (or affiliates alike) who want to use WordPress as a platform to sell their hosting.

Pro’s:

  • Many useful shortcodes, such as pricing tables, very suitable for web hosts and affiliates.
  • Responsive layout.
  • Great features.
  • Nice, good looking theme.
  • Many options in the backend (if you consider that a pro, some people don’t).

Con’s:

  • Not all features in the theme are compatible with the latest WordPress (version 4.0 and above). In order for you to have all features working nicely, you need to use older version of WordPress, which is not recommended at all.
  • Users need to consider using SSL with the theme if used with older version of WordPress. Theme demo on ThemeChilly’s website for this theme is running on an old version of WordPress, so they hide the version and put the site on SSL to tighten security.

We recommend instead:

Anything not on Themeforest.

Verdict:

Nice if you have SSL ready for your website, or if you don’t mind letting go of some key features of the theme in order to use it with the latest version of WordPress. Else, consider other web hosting themes.

GPL License Abuse In WordPress: Money Out Of Thin Air?

GPL license is designed, among others, to encourage innovation and development in software industry without being confined by certain vendor or developer. The original purpose of GPL is all in a good spirit. It’s for the user, for the people. That’s what makes WordPress so amazing.

Look how far WordPress have come and how much it has benefited everyone. The growth of WordPress itself and its community are so rapid year after year. It’s a good thing all around.

Now, WordPress make lots of people lots of money, don’t it? Many have built businesses off WordPress. But with all of this, there also came those who set out to abuse the license and the system, for their own profit. People who just blatantly abuse the GPL license, not to benefit the community, not to contribute to innovation, not to help other people in a good manner, but to make profits out of thin air.

I’m talking about people who blatantly take other people’s products (plugins or themes) and then sell those for a lot less than the original prices without adding value to the plugins or themes. In other words, they’re making money not actually doing anything at all. Doesn’t this straight out defeat the real purpose of GPL and Open Source?

The rights that were promoted by Free Software Movement (free as in Freedom) are, quoting Richard Stallman (founder of Free Software Foundation):

1. The freedom to run the program as you wish,

2. The freedom to study the source code and then change it so that the program does what you wish,

3. The freedom to help your neighbor  that is, to distribute copies to others  when you wish,

4. The freedom to contribute to your community  that is, the freedom to distribute copies of your modified versions  when you wish.

Now I’m no expert in this, and I also understand it has been going on for some time, not just recently, but at least if you’re going to do something like that, add some value to the products first, will you? Wouldn’t it be better? You profit but you also contribute to the community, ya know? However small it might be.