Quantcast
Channel: Site5 Free Premium WordPress Themes » All Posts
Viewing all articles
Browse latest Browse all 8865

Reply To: Unable to add image to slide

$
0
0

Hey, I’m also having the same problem here. However, I’ve started looking into it and I’ve come to thinking that there is something wrong with the script “homepage-slider.php”, which you can view in the Theme Editor.

< ?php

$thumbId = get_image_id_by_link(get_post_meta($post->ID, 'snbf_slideimage_src', true));

$thumb = wp_get_attachment_image_src($thumbId, ‘slide’, true);

?>

<li><a href=”< ?php echo $fitemlink ?>“><img src=”<?php echo $thumb[0] ?>” alt=”< ?php echo $fitemcaption ?>” /></a>

I would think that the bolded text is providing the problems. First, ‘true’ was set to false – I made that change, just to see what the results would be. This made me discover that the image applied to my slides were a default image known as “default.png” from [wp-includes/images/crystal/default.png]. Meaning that the bolded code are not sufficient enough to get the images assigned to the slider – infact, it might be picking stuff up from a completely different location.

The code from the beginning of “homepage-slider.php” might need to be rewritten, but I will continue to experiment and see what happens. But if there are any coders who can help, please do so. :)


Viewing all articles
Browse latest Browse all 8865

Trending Articles