Dear Sajjad,
I realized the plugin resizes the uploaded image to 300px. Is it possible to modify this to a bigger size?
Thank you, best regards
]]>Hi, after the last update plugin stop showing my custom taxonomy image.
Instead of image url on the page it shows: ‘Please Upload Image First!’ even if I have image uploaded.
Can you help me with this?
Thanks in advance!
Hello, I’m trying to include the alt
attribute in the<img>
tags. I’m using the get_taxonomy_image
function to fetch the image, but it doesn’t return the alt
attribute with the tag. Can anyone show me how I might modify my code to include the alt
tag for images? Here’s what I’m currently doing:
function wpc_elementor_shortcode_2($atts) {
if (!is_tag()) {
return; // Only run this in tag archives
}
$tag_id = get_queried_object()->term_id; // Get the current tag ID
$image_url = get_taxonomy_image($tag_id); // This function is supposed to fetch the image URL
if ($image_url) {
echo '<img src="' . $image_url . '" style="max-height:100px;">'; // Output the image
}
}
add_shortcode('tags_image_archive', 'wpc_elementor_shortcode_2');
]]>
Getting this concerning error with the plugin – (even after running regenerate thumbnails to ensure everything exists):
PHP Warning: Trying to access array offset on value of type null in /var/web/site/public_html/wp-content/plugins/advanced-category-and-custom-taxonomy-image/wp-advanced-taxonomy-image.php on line 595
]]>Hi,
I have installed the plugin and successfully added image to a product tag. However, in the elementor template, I would like to add this as a dynamic tag so that the corresponding banner is displayed when each product tag archive page is loaded. How can I achieve this? I currently don’t see the option.
]]>I am having an issue displaying my Tag images on the Tag Archive page. See this link:?https://ndogoworks.com/sparrow/product-tag/test-product-tag/
How can I display the tag image I have added in the edit tag screen on wp admin?
Your help is much appreciated!
]]>sorry for my ignorance, I installed the plugin and set the settings as shown in the images. But it doesn’t show the image on the category page. Maybe I need to add this php script somewhere?
$taxonomy_img = get_taxonomy_image( int $term_id = get_queried_object()->term_id , boolean $return_img_tag = false , array $class = array() );
get taxonomy image url if $return_html = true then return tag
Parameters :
$term_id
(int) (Required) Taxonomy ID of the term.
$return_img_tag
(boolean) (Optional) Formatted Image with tag for the field during output.
$class
(array) (Optional) Array of image classes ex: array(‘class1′,’class2’,…) but $return_img_tag should be true to add image class.
echo $taxonomy_img; // taxonomy image url
thank you
Luciano
]]>I want when there is no photo
Display an image by default
The plugin itself displays the tex “Please Upload Image First”
tnx
]]>Hello
Is it possible to display product attribute images in woocommerce information tabs in the product site?
I am using this plugin to try and add custom artwork to each post category on my site, however, I was hoping the image URL could also be exposed via the ../wp-json/wp/v2/categories rest api end point.
Is there any way this can be achieved with the plugin that you are aware of?
Thank you
]]> <?php
$args=array('public' => true, '_builtin' => false);
$output = 'names';
$operator = 'and';
$taxonomies=get_taxonomies($args,$output,$operator);
if ($taxonomies) {
foreach ($taxonomies as $taxonomy ) {
$terms = get_terms($taxonomy);
$count = count($terms);
if ( $count > 0 ){
foreach ( $terms as $term ) {
$termlinks= get_term_link($term,$taxonomy);
?> <div class="pro_block">
<a href="<?php echo $termlinks; ?>">
<img src="<?php bloginfo('template_url'); ?>/images/ideal-exotica-videopic.jpg" alt="">
<span class="pro_name"><?php echo $term->name; ?></span>
</a>
</div>
<?php
}
}
}
}
?>
This is my code. In this how can I show the taxonomy image. Please help me with it.
I have managed it display the taxonomy name.
Hello,
I am trying to display all attribute terms with an image in my content-single-product.php I understand the use of echo get_taxonomy_image( $term_id ); but how to i display images only for attributes that each individual product has.
For example product1 has color:red size: medium attributes. How will i display this in product page with their image.
Thanks
]]>Hello dear friends.
I created a custom image size (width this line: “add_image_size( ‘category-thumb’, 2731, 1024, true );”) but could not find how to use it with “Advanced Category and Custom Taxonomy Image”
Thank you for your help.
Below is the code I have:
=========
<img src=”<?php
foreach((get_the_category()) as $category);
$taxonomy_img = get_taxonomy_image( $category->cat_ID );
if ($taxonomy_img == “Please Upload Image First!”)
{
echo get_template_directory_uri(); echo ( ‘/images/cat_img.jpg’ );
}
else {
echo( $taxonomy_img );
}
?>”>
=========
<?php
/**
* Display Custom Product Taxonomy [Brand] Images
* Install Plugin: Advanced Category and Custom Taxonomy Image BEFORE adding the following code to your child-theme functions
*/
function fwuk_display_custom_taxo_images() {
global $product;
$tax = ‘brand’; // your custom taxonomy name
$terms = get_terms( array( // Since 4.5.0
‘taxonomy’ => $tax,
‘hide_empty’ => false, // include empty terms
) );
foreach( $terms as $term ) {
$taxonomy_img = get_taxonomy_image ($term->term_id);
if (filter_var($taxonomy_img, FILTER_VALIDATE_URL)) { // check if there is valid image URL
echo ‘<div class=”taxo-image”>‘ . ‘‘ . ‘</div>’; // display taxo image
}
else { // if no valid image URL exists, display the taxo name instead
echo ‘<div class=”taxo-text”>‘ . $term->name . ‘</div>’;
}
}
}
add_action( ‘ hook into any of your theme action-hook locations ‘ , ‘fwuk_display_custom_taxo_images’ );
?>
]]>Hi im trying to install and configure the plugins, and i tried to add images but its not showing the category icon in the main page with sidebar categories, kindly help please thanks and looking forward
]]>Hi !
I have a custom taxonomy with 500+ terms.
I use this script to get all terms
<?php
$tax = 'dtcast'; // your taxonomy name
// get the terms of taxonomy
$terms = get_terms( $tax, [
'hide_empty' => false, // do not hide empty terms
]);
// loop through all terms
foreach( $terms as $term ) {
// display link to the term archive
echo '<strong class="danny-vien"><a href="'. get_term_link( $term ) .'">'. $term->name .'</a></strong>';
}
?>
It’s work ok !
Now i want to get images of terms.
Please help me to get it.
I used this plugin to add images to product affributes in woocommerce. Now I’m trying to display them in the additional information tab on the product site. Can someone assist me in doing this?
Cheers
]]>Hi, thank you for the plugin,
Can you please show the code example how to call the category image on the page?
I tried to paste
<?php get_taxonomy_image(3);?>
in my Category.php page in the div where the image should be placed, but nothing.
Should I add some other codes somewhere?
THanks,
Erica
I have a custom post type with a custom taxonomy with images. Rather than echoing a single image I would like to loop through the custom taxonomy and show all images of tags that the post has.
For instance the custom post is a team, and teams win awards. And each award has an image. So on a team page, I would show all awards the team has been tagged with. Is that doable with this plugin?
]]>Hi,
this is a rather functional issue, I have about 300 terms in my taxonomy called ‘label’, and I want to add images to all of them, problem is I don’t have all images yet, how can I tell which terms have an image and which not ? Just a suggestion, wouldn’t it be possible to only show the Taxonomy Image Template Tag, if there is an image attached to the term, or maybe add a miniture of the image to the left of the term name …
thanks a lot for your consideration
Joel
I am using Elementor page builder on this website where header section is configured to display the product category image on the product category archive pages. This is working fine.
I’ve used Category and Taxonomy Image plugin to attach unique image to product tag and product attribute as WooCommerce doesn’t allow image attachment to product tag and product attribute. Now each product tag and product attribute has its own unique image. However, I am unable to display these attached images on the product tag and product product attribute archive pages.
Is it possible to achieve this with your plugin? If yes, can you point me how to do it?
Thanks you.
]]>Hi!
I use this code, but nothings shows up:
<?php get_taxonomy_image($term_id); ?>
I’ve inserted it in my taxonomy-pa_swatches.php
]]>