2015-01-21, 02:35:25
(2015-01-20, 13:57:38)sarnaiz Wrote: Hi Martin,
I am having trouble with getting an image to show in my results display.
I have a news special page with several fields which are working, but the image "thumb" does not appear.
...
I am using the following code in my search:
PHP Code:<h3 class="search-entry-title">
<a href="<?php get_special_field('link','',false); ?>">
<?php get_special_field('title','',false); ?>
</a>
</h3>
<?php get_special_field_image($thumb, $title=true, $width=200, $crop=false); ?>
<div class="search-entry-news-summary"><?php if (return_special_field('summary')=='') { get_special_field_excerpt('content', $numWords); } else { get_special_field('summary','',true); } ?></div>
If the name of the field containing the link to the image ist "thumb", the code would be
Code:
<?php get_special_field_image("thumb", null, 200); ?>
Code:
<?php get_special_field_image("thumb", return_special_field('title','',false), 200); ?>