Hi there, first of all i would like to let you know that i have tried everything suggested in the forum before disturb you guys, but i'm 5 days away from the delivery of this project so after 2 days i cannot afford just keep trying by myself since my PHP knowledge is pretty limited.
What i'm trying to do is assign an image/thumb to each term under my custom taxonomy(slug = venture-type) so as suggested in other threads of the forum i installed "Taxonomy Images" plugin (just to be exact this is the one i'm talking about http://wordpress.org/plugins/taxonomy-images/ ) and then added the shortcode in my functions.php in order to be used inside Views.
Here is my Views Meta HTML:
[wpv-layout-start]
<!-- wpv-loop-start -->
<div id="emotions-table">
<table width="100%">
<wpv-loop wrap="5" pad="true">
[wpv-item index=1]
<tr><td><a href="[wpv-taxonomy-url]" title="[wpv-taxonomy-title]"><img src="[taximage]" alt="[wpv-taxonomy-title]" title="[wpv-taxonomy-title]" width="175" height="250" align="left" class="emotion-thumb"/><div id="emotion-name">[wpv-taxonomy-description]</div></a></td>
[wpv-item index=other]
<td><a href="[wpv-taxonomy-url]" title="[wpv-taxonomy-title]"><img src="[taximage]" alt="[wpv-taxonomy-title]" title="[wpv-taxonomy-title]" width="175" height="250" align="left" class="emotion-thumb"/><div id="emotion-name">[wpv-taxonomy-description]</div></a></td>
[wpv-item index=5]
<td><a href="[wpv-taxonomy-url]" title="[wpv-taxonomy-title]"><img src="[taximage]" alt="[wpv-taxonomy-title]" title="[wpv-taxonomy-title]" width="175" height="250" align="left" class="emotion-thumb"/><div id="emotion-name">[wpv-taxonomy-description]</div></a></td></tr>
[wpv-item index=pad]
<td></td>
[wpv-item index=pad-last]
<td></td></tr>
</wpv-loop>
</table>
</div>
<!-- wpv-loop-end -->
[wpv-no-taxonomy-found][wpml-string context="wpv-views"]<strong>No taxonomy found</strong>[/wpml-string][/wpv-no-taxonomy-found]
[wpv-layout-end]
And this is how it renders(BEFORE ADDING THE SHORTCODE TO FUNCTIONS.PHP): hidden link
Until now everything looks as expected since the shortcode is not added to functions.php yet.
The next step is to add the shortcode to my functions.php in order to render the URL of the image instead of [taximage] word.
This is what i tried at first:
add_shortcode('taximage', 'taximage');
function taximage() {
global $post;
return apply_filters( 'taxonomy-images-queried-term-image-url', '', array('post_id' => $post->ID, 'taxonomy' => 'venture-type') );
}
And this is how it renders: hidden link as you can see the word [taximage] disappears but nothing else happen it returns blank without any url.
I have also tried the below tweaks(as i said my PHP is limited so i'm tweaking to find a solution to this) but the same result as above:
add_shortcode('taximage', 'taximage');
function taximage() {
return apply_filters( 'taxonomy-images-queried-term-image-url', '', array('taxonomy' => 'venture-type') );
}
1st Tweak:
add_shortcode('taximage', 'taximage');
function taximage() {
return apply_filters( 'taxonomy-images-queried-term-image-url', '' );
}
2nd Tweak:
$image_url = apply_filters( 'taxonomy-images-queried-term-image-url', '' );
add_shortcode('taximage', 'taximage');
function taximage() {
return $image_url;
}
3rd Tweak:
$image_url = apply_filters( 'taxonomy-images-queried-term-image-url', '' );
add_shortcode('taximage', 'taximage');
function taximage() {
print $image_url;
}
As already said all the above return the same result: hidden link
One more time sorry for disturbing you with this since it involves a third party plugin but i saw in the forum that CaridadZ and some other support members are pretty good with this and i'm kind of screwed here because i need to have this ready urgently.
Thanks in advance,
Stelios