If you ever need to use Advanced Custom Fields to load an image or attachment on a category, here’s the template code you need. 🙂
// vars $queried_object = get_queried_object(); $taxonomy = $queried_object->taxonomy; $term_id = $queried_object->term_id; // load thumbnail for this taxonomy term (term object) $thumbnail = get_field('thumbnail', $queried_object); // load thumbnail for this taxonomy term (term string) $thumbnail = get_field('thumbnail', $taxonomy . '_' . $term_id); the_field( $thumbnail );
More posts from themightymo.com
Today I had an issue where I needed to merge two folders, each of which contained many sub- and sub-sub folders that had lots of images. After a lot of trial-and-error and some Googling, I found the best solution is to use the “ditto” command in Terminal like this: That’s it! Hat tip to AppleInsider.
I wasted some time today to bring you (dum dum duuuuum!): Some Surprising Trends in Website Development!
I was recently asked to look into creating some secure http headers as well as forcing a website to load over TLS1.2+. Below are my “how to” instructions for updating these settings within WordPress and Cloudflare. Install & Configure the Cloudflare WordPress plugin. Make sure an SSL Certificate is installed on your host for your…