qTranslate and Thumbnails
-
I have added a thumbnail for every entry that shows up in the list of posts. My problem is that the thumbnail appears in the pages in default language but does not appear in the pages in the second language (The URL of the image has the language code added to it, so it shows up broken). Here is my codes:
<h1 class="entry-title-temp"><a href="<?php the_permalink() ?>" rel="bookmark"> <?php the_title(); ?> </a></h1> <?php edit_post_link(__('edit page','tarski'), '<p class="metadata">(', ') '); ?> </div> <!-- /meta --> <?php // this grabs the image filename $values = get_post_custom_values("thumb-image"); // this checks to see if an image file exists if (isset($values[0])) { ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img class="thumb-image" src="<?php bloginfo('url'); echo '/'; echo get_option('upload_path'); echo '/'; $values = get_post_custom_values("thumb-image"); echo $values[0]; ?>" alt="image" /></a> <?php } ?> <?php if (get_the_excerpt() != "") { ?> <div class="content"> <?php the_excerpt(); ?>
This is how I added the thumbnail to the post:
Click here to see the screenshot.This is how it looks like in the pages in default language:
Click here to see the screenshot.And this is how it looks like in the pages in the second language:
Click here to see the screenshot.The problem is that the address to the thumbnail in the page in default language is:
>> https://sourena.net//wp-content/uploads/hom-cat-003-hard-candy.png
But in the page in the second language the address changes to:
>> https://sourena.net/fa//wp-content/uploads/hom-cat-003-hard-candy.png
How can I remove that additional “/fa/” in the thumbnail’s address?
- The topic ‘qTranslate and Thumbnails’ is closed to new replies.