Description
The RDV Category Image plugin allows adding an image to a category, tag, or custom taxonomy. Please review the code snippets below to display a category image on a category page template, page, or post.
-
Use the template tag
rdv_category_image_url();with the PHPechofunction to retrieve the category image URL, and then use it in an image tag.<?php if(function_exists('rdv_category_image_url')){ echo rdv_category_image_url(); } ?> -
Use the template tag
rdv_category_image();in the category template file to display the category image directly.<?php if(function_exists('rdv_category_image')){ rdv_category_image(); } ?> -
Use the shortcode in a page, post, or page builder template to display a category image. The basic shortcode without attributes
[rdv_category_image]displays the image on a category archive page. Use the shortcode attributesterm_idandsizeto display a specific category image and size on any page or post.[rdv_category_image] [rdv_category_image term_id="10"] [rdv_category_image size="thumbnail"] [rdv_category_image term_id="10" size="thumbnail"]
Screenshots



Installation
- Go to the WordPress admin area and select Plugins > Add New from the menu.
- Search for “RDV Category Image”.
- Click install.
- Click activate.
FAQ
-
Where can I find the shortcode for my category?
-
When you edit a category that has an image, a shortcode automatically appears on the edit page like this:
[rdv_category_image term_id="10"]Simply click the shortcode to copy it to your clipboard, then paste it anywhere on your site (posts, pages, widgets).
-
The image isn’t showing on my site. What should I check?
-
Please check these three items:
1. Go to RDV Category Image settings and verify that the taxonomy (Categories, Tags, etc.) is checked and saved.
2. Confirm you’ve uploaded an image for that specific category.
3. Clear your site cache and refresh the page. -
Does this work with WooCommerce product categories?
-
Yes! WooCommerce product categories are fully supported:
- Go to RDV Category Image settings.
- Check “Product categories (product_cat)”.
- Click Save Changes.
- Edit any product category and upload an image.
Use the shortcode displayed on the edit page to show the image anywhere in your store.
-
Will this plugin slow down my website?
-
No, the plugin is lightweight and will not affect your site’s performance. It only loads administrative scripts on relevant category edit screens.
-
Do I need to edit my theme files to use this plugin?
-
No! Editing files is not required for most users. Simply use the shortcode that appears when editing a category and paste it into:
– Pages or posts (using the shortcode with theterm_idattribute).
– Page builder modules (such as Elementor, Divi, or Beaver Builder).
– Page builder category archive templates.Advanced users who want more control can optionally add template tags to child theme files – see the template tag examples in the Description section above.
Reviews
Contributors & Developers
“RDV Category Image” is open source software. The following people have contributed to this plugin.
Contributors“RDV Category Image” has been translated into 1 locale. Thank you to the translators for their contributions.
Translate “RDV Category Image” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.1.1
- Compatibility: Tested up to WordPress 7.0
- Security: Replaced direct-access guards with the
return;pattern. - Security: Removed the redundant manual nonce field on the settings page, as the WordPress Settings API handles this automatically.
- Security: Hardened term image save/update sanitization using
absint( wp_unslash(...) ). - Security: Updated admin page capability checks and requirements to
manage_optionsfor consistency with settings access. - Security: Added defensive checks in frontend helpers to prevent edge-case PHP notices.
- Fix: Defined helper functions in
function_existschecks to prevent conflicts. - Fix: Maintained taxonomy image column output after Quick Edit and Add Term AJAX refreshes.
- Fix: Updated category list thumbnail column output to return HTML.
- Enhancement: Limited admin and media asset loading to the plugin settings and taxonomy edit screens for improved performance.
- Enhancement: Added a scoped success notice (
Settings saved successfully.) on the plugin settings page. - Enhancement: Improved the category image edit screen with dynamic
Add ImageandChange Imagebutton labels. - Enhancement: Updated the category image size dropdown to display dimensions and disable unavailable sizes.
- Enhancement: Optimized column filter registration to only run on active taxonomy list pages.
- Enhancement: Updated settings page instructions to support translation.
- Enhancement: Added keyboard support (Enter/Space) to the click-to-copy shortcode.
- Tweak: Localized the media frame handling in the admin JavaScript to prevent global variable conflicts.
- Tweak: Improved media frame image URL fallback logic when certain attachment sizes are unavailable.
- Tweak: Removed unnecessary output buffering in the shortcode flow.
1.1.0
- Compatibility: Tested up to WordPress 6.9
- New: Added shortcode preview on category edit page with click-to-copy functionality.
- Security: Added nonces and capability checks for term image add/edit.
- Security: Sanitized inputs (use
intval()for image IDs) and improved attribute/URL escaping. - Security: Added a sanitize callback for plugin options.
- Fix: Handled missing/invalid attachments to avoid PHP notices.
- Enhancement: Refactored JavaScript to eliminate global variables and use targeted event handlers for improved reliability.
- Enhancement: Initialize plugin on
plugins_loadedhook for proper WordPress integration. - Tweak: Preselect the existing image in the media modal when editing a category image.
- Docs: Added FAQ section to readme.txt.
1.0.10
- Compatibility: Tested up to WordPress 6.8.1
- Tweak: Minor adjustments to code.
1.0.9
- Compatibility: Tested up to WordPress 6.5.2
- Tweak: Minor adjustments to CSS and code.
1.0.8
- Compatibility: Tested up to WordPress 6.4.2
1.0.7
- Compatibility: Tested up to WordPress 6.2.2
- Tweak: Added notice – Settings saved.
- Tweak: Added categories/taxonomies labels.
1.0.6
- Compatibility: Tested up to WordPress 6.1.1
1.0.5
- Compatibility: Tested up to WordPress 6.1
1.0.4
- Compatibility: Tested up to WordPress 6.0.1
1.0.3
- Documentation Update
1.0.2
- Documentation Update
1.0.1
- Updated documentation
1.0.0
- The First Release
