WordPress.org

Forums

Sideways8 Simple Taxonomy Images
A code snippet for newbies (1 post)

  1. ianarmstrong
    Member
    Posted 1 year ago #

    If you're here because you have no idea how to

    a) Query a custom taxonomy
    b) Create a foreach loop with that taxonomy
    c) Get the image object
    d) Grab the source of that object
    e) Create an array of backup images in case no image exists
    f) Display the image (or placeholder) along with taxonomy data

    That's because there really isn't any documentation for this plugin. That's a shame, since it's actually a really nice piece of code.

    I don't have time to write a full tutorial, but I commented up my function that grabs either the entire term list of employees (people taxonomy), or just the ones linked to the page/post, depending on what is passed by reference - then displays the list with its corresponding image.

    This is pretty hands-on stuff but if you're completely list, it should point you in the right direction:

    http://pastebin.com/WCAahX5m

    If you're not using ACF, this plugin costs less overhead. If you are, already using ACF, you might find the documentation a bit more user friendly.

    https://wordpress.org/plugins/s8-simple-taxonomy-images/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Sideways8 Simple Taxonomy Images
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags