Bottle of Brass

"He shook it, and found it to be heavy, and said, I must open it, and see what is inside."

  • WordPress

    WooCommerce – breadcrumbs and multiple categories

    June 13, 2014

    When there are multiple possible breadcrumbs, WooCommerce picks the first possibility. If the product is found from following a different path, the breadcrumbs no longer match the expected order.  To make the breadcrumbs match the path used to reach the product I used the following strategy: Use a cookie to record the last visited product archive page. On the single…

    Read More
    Michael Levy 4 Comments
  • php,  WordPress

    WordPress Date Archive by Post Type

    March 6, 2014

    Adding the post type in the archive query string displays the relevant posts. It is that easy! my-wordpress-site.com/2014/3/?post_type=legend

    Read More
    Michael Levy No Comments
  • WordPress

    Woocommerce: Adding Cross-sells to single product template

    December 13, 2013

    The client wanted to hand-pick which related products would be visible on the product pages.  So I replaced ‘related products’ with ‘cross sells’. Step 1: get the ids of the cross sell products using the  ‘_crosssell_ids’ meta key. Step 2: Loop through the products by id

    Read More
    Michael Levy 16 Comments
  • WordPress

    Fixing image uploading in WorPress without resorting to CHMOD 777

    July 24, 2013

    Using  CHMOD 770 on the ‘wp-content’ and ‘uploads’ folders.

    Read More
    Michael Levy No Comments
Savona Theme by Optima Themes