I’d say your third option is the way to go.
Incidentally, why did you roll your own static cache in taxonomy_image_plugin_get_associations()
instead of using the built-in WP_Cache API for that? Is there a reason wp_cache_get
wouldn’t work here? Seems like using the WP object cache would optimize better when people do have caching plugins turned on.
Related Posts:
- tax_query in get_posts() not working?
- Display Post by taxonomy and taxonomy child
- orphaned taxonomy terms remove by sql query
- Show only, when taxonomy has posts?
- Custom WP Query: force entry for some taxonomy and have others optional
- Get posts by name and taxonomy term
- Using get_posts() with tax_query parameter set isn’t working with attachments
- Modify the query method when adding category filtering function to the custom post list
- Exclude posts with taxonomy term from appearing on home page query
- Syntax help needed: Taxonomy Query
- How can I query all post with currrent taxonomy term?
- Retrieve all term IDs of post
- Exclude taxonomy Query if post_type
- Query Two Different Taxonomies Nested
- Including taxonomy in searches
- What is this Query? and why its taking too much time? Any way to optimize it?
- $product->ID in has_term() not working, but manually inputting the ID works, why?
- How to get a query odered by N of matching taxonomies?
- How to filter the terms to a special custom taxonomy?
- How do I add tags/taxonomy to images + a query field on page to query ‘albums’ (images with same tag/taxonomy)
- Passing values by form to create a query
- The Difference Between Hierarchical and Non-Hierarchical Taxonomies?
- Attaching taxonomy data to post with wp_insert_post
- Can the default “post tags” taxonomy be renamed?
- Custom taxonomy list page?
- What is wp_insert_term “alias_of” arg for?
- get a specific taxonomy term name
- get_terms() How many is TOO many?
- How to display child term of current term’s parent taxonomy?
- Sorting custom taxonomy causes menus error
- Duplicate Queries
- Is there any difference between post in child term and child & parent terms?
- How to add automatically keyword to taxonomies when a post published, and assign them to the post
- Query multiple taxonomy in Custom Post Type
- Create and move terms for taxonomies
- Looping Through Custom Tax Terms and Displaying All Posts For Each
- How can I remove links from the function “get term list”?
- Alphabetical order in taxonomy.php
- Get Term names from WP Term Object
- functions to create term and child terms
- base directories / URL
- WordPress REST get all items without a taxonomy assigned
- Getting the parent from the wp_term_taxonomy
- posts_per_page doesnt work
- How do I get the current tag out of a taxonomy?
- Pass array of taxonomy terms to wp_query
- If search matches taxonomy
- Showing custom taxonomy column in taxonomy category listings immediately after create category
- Custom Field as Custom Taxonomy?
- Order wordpress taxonomy parent terms by their children count
- Return Taxonomy/Term Information with Posts (WP_Query/get_posts)
- Why a URL with a query is always slower than that without a query?
- Weird orderby => post__in issue
- need to get postthumnails from a post whithin a category custom post type
- Group Post by Custom Taxonomy 2 under Custom Taxonomy 1
- Individual post. Meta_key, taxonomy or post status for separation?
- Taxonomy archive page WP_Query does not return get_the_permalink() or get_permalink() value
- Query if audio attachment AND/OR custom field
- How to show taxonomy image instead of taxonomy name on a list
- benefits of the table ‘wp_term_taxonomy’
- How to save a multiple checkbox array into a non-hierarchical taxonomy
- `get_terms()` with `child_of` and `childless` combined
- Add text to the end of each list item in wp_list_categories
- echo term name outside the loop, using term slug
- What are these undocumented arguments for register_taxonomy?
- Dynamic filtering of posts with custom taxonomies
- Sorting tags by name
- Cache DB queries result
- Modify output of wp_dropdown_categories to add term IDs to each option
- How to give classname to post if post has no content?
- How to get terms from a custom taxonomies after WordPress 4.5.0
- Search Media by taxonomy
- Get Taxonomy name from “registered_taxonomy” hook
- In two-category searches, where does WordPress save the title of the 2nd category?
- Show only first child in dropdown
- Custom taxonomy query showing more than 4 posts
- Custom Post Type + Custom Taxonomy = Archive Listing Page Problems
- Taxonomy term archive default loop returns 1 record instead of 8
- Related terms – Terms that feature in post of current term
- Select query with two and two related taxonomies
- Taxonomy Dropdown Question
- Customize menu link for taxonomy in WP menu
- How To Query For An Empty Taxonomy Field
- Is possible hide hierarchical select dropdown created by jetsmartfilters? (only visual issue)
- How can I get posts by 2 meta keys, prioritising one of them?
- Add specific content to a taxonomy results page
- Set the limit of taxonomy per page
- Same page for startpage and archive?
- Category_in return empty
- Get taxonomy url, name, post count & image
- Rewrite permalink to include multiple taxonomies
- how to print post tags [duplicate]
- Filtering posts by taxonomy and meta_value
- What to do with shared terms splitting in WordPress 4.2?
- Related Posts by taxonomy using Advance Custom Fields Plugin
- Custom Taxonomy Page redirect 404
- Child Terms not Displaying on the Taxonomy Term Admin Screen
- multiple taxonomies in wp_list_categories’ $args
- What is the best way to cache pages and queries in WordPress?
- How to orderby Taxonomy Term in a WP Query