In this case the substitution effect would be positive (an exeption) and the income effect would be positive too, because if the inferior good price rises, the family will have less resources to consume the same quantity of normal goods and will in default consume more of the inferior good (bacause its income does not allow to continue consuming the normal good).
The best example is the consumption of bread of the poorer families which will consume more bread if the bread price rises, because the family will curtail the consumption of more quality goods; and how the bread being still the cheapest good that can be bought the familiy consuption will go toward for more bread.
The substitution effect is negative for a giffen good (for all goods, it is opposite the movement in price, “negative”). As the price of X increases, consumption would shift to a substitute, good Y.
The income effect for a normal good is positive. As your income increases, you will purchase more of good X.
For an inferior good, however, the income effect is negative-- higher income means you consume less of good X and more of good Z (because you can afford the more expensive good, Z). A good example of this effect (inferior good) is consumption of rice (or another cheap food that would be an inferior good). As your income rises, you shift your consumption of the cheap good towards a more expensive good, say meat.
A giffen good is an inferior good with a wealth effect that dominates the substitution effect. A price increase for good X would cause you to purchase more of good X, overall.
Think of the mechanism in this way:
The increase in price of X would lead you to search for substitutes, but there may not be any, so the substitution effect is minimal in relation to the wealth effect.
Now, as the price of X is higher, your income effectively declined (we can’t purchase as much of X, but it’s still the “affordable” good).
The inferior nature of good X tell us that the decline in income will cause us to purchase MORE of good X (again, think of a cheap food-- if your income declines, you will purchase more of the cheap food).
The income effect is larger in magnitude than the substitution effect, causing demand to increase for X at the higher prices. This leads to an upward sloping demand curve.
You can do a quick google search of “Giffen Good Irish Famine” for a brief story that might also help.