Search Site

Category: Wordpress

Last year Woocommerce made some code changes to their shopping cart that can cause any theme running Bootstrap to break the layout of their checkout page. The file itself is form-checkout.php found in woocommerce/templates/checkout. In this file, they now use ‘col-1’ and ‘col-2’ as their two columns in the checkout page. This conflicts with newer versions of Boostrap where ‘col-1’ and ‘col-2’ dictate column widths, and therefore show their checkout columns as very narrow. Col-1 is a random and badly planned class for woocommerce – since it really doesn’t specify what the column is. The easy way to fix this is to include some css in your theme that overwrites the max-width setting that Bootstrap has for col-1 and col-2. Here’s the code that works: Thanks to muktoapb who came up with the workaround at the original issue on github....

Here’s a simple php code for WordPress that gets the Featured Image from a parent post and displays it on a child page. I had this come up recently for someone who was creating an online guide, so the parent post was the primary topic, and they wanted to easily make all sub posts have the same header without having to do it themselves. I also added the conditional functionality to look for the post thumbnail for the child post first – so that you could overwrite it if you wanted. This also uses ‘global $post;’ as it was used outside the loop – you should be able to remove that if you’re using it in the loop....