Event images not displaying
This topic contains 15 replies, has 3 voices, and was last updated by urbanfix 8 years, 10 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
January 5, 2016 at 12:14 pm #66661
Hi, my event images arent displaying on import, this is an issue which has been fixed in the past by @giri see here.
I am unsure what the problem exactly is or what was done to rectify it, only that it worked after I tested it (after the fix).I haven’t tried it since or done any updates/changes to any files or plugins, but its now not working.
Please could someone have a look at whats going wrong?
thanks, UFJanuary 5, 2016 at 12:19 pm #66663This reply has been marked as private.January 5, 2016 at 3:17 pm #66683Do you mean when using CSV to import events?
I scrolled through the last added events and cannot find any missing images.I found one listing with a missing image because it has not been uploaded to /wp-content/uploads/2016/01/12630559.jpg
January 5, 2016 at 4:37 pm #66701yeah via the csv import!
They aren’t displaying on the actual listing though…!
The picture is on the tab (on detail listing page but not at the top)
Please note this is just for events..!
–Thanks UFJanuary 6, 2016 at 1:05 am #66797Your “whoop-event-photos” DIV is empty, there should be an image there. There must have been some customization made to that, because the default Whoop theme works correctly.
We only provide support for the GD core plugin to non-members, so please renew your support membership, then we can have a look at your Whoop and events problem.
January 6, 2016 at 1:19 am #66798This reply has been marked as private.January 6, 2016 at 7:27 am #66831Hello urbanfix, last time I have modified thumbnail display function on your website and nothing else.
Instead of wp_get_attachment_image_src function, I have used geodir_get_featured_image function.
Check the screenshot for the code I changed.
So my last change only deals with thumbnail display function. But right now the thumbnail is not getting displayed because its returning 404 error which is entirely different issue.
I hope you are talking about the thumbnail i pointed out using the arrow in 2nd screenshot. If its not then i’m missing something here
January 6, 2016 at 12:06 pm #66849hi @giri, unfortunately that isnt what im talking about.
I’m talking about the event listing detail page see this link.
There should be a thumbnail image displayed on the page and their isnt!Thanks, UF
January 6, 2016 at 12:50 pm #66881Ok fixed it. Please check it and let me know.
January 6, 2016 at 1:01 pm #66885@giri Thanks thats perfect they are all displaying.
I shall delete all events listings and upload the CSV from scratch and images via ftp and let you know how it goes!
Thanks guys!
January 6, 2016 at 4:30 pm #67161This reply has been marked as private.January 13, 2016 at 11:24 am #68111I have updated to the latest version of whoop and the issue is back,
If you could fix it and then tell me what to do after each update i could do it myself,
Thanks, UFJanuary 13, 2016 at 11:48 am #68118Hi urbanfix, sorry for the trouble. We haven’t released any new version after the fix i applied on your website. The fix will be included in the next version.
This is what I changed.
File geodirectory_whoop/functions/events.php
Around line 68
// if (has_post_thumbnail()) { // echo get_the_post_thumbnail( $post->ID, array( 250, 200) ); // } if ($fimage = geodir_get_featured_image($post->ID, '', true, $post->featured_image)) { ?> <img width="200" src="<?php echo $fimage->src; ?>" class="attachment-250x200 wp-post-image" alt=""> <?php }
January 13, 2016 at 1:40 pm #68131No worries @giri! Thanks for all the support!
I’ve done something wrong as now my home page is plain white.The PHP looked like this:
<div class="whoop-event-photo-inner"> <?php if ($preview) { $image_url_string = $post->post_images; if (!empty($image_url_string)) { $image_urls = explode(',', $image_url_string); $image_url = $image_urls[0]; ?> <img width="200" src="<?php echo $image_url; ?>" class="attachment-250x200 wp-post-image" alt=""> <?php } } else { if (has_post_thumbnail()) { echo get_the_post_thumbnail( $post->ID, array( 250, 200) ); } } ?> </div> </div> <h1 class="entry-title geodir-big-header-title fn whoop-title"> <?php echo esc_attr(stripslashes($post->post_title)); ?>
I changed it to:
<div class="whoop-event-photo-inner"> <?php if ($preview) { $image_url_string = $post->post_images; if (!empty($image_url_string)) { $image_urls = explode(',', $image_url_string); $image_url = $image_urls[0]; ?> <img width="200" src="<?php echo $image_url; ?>" class="attachment-250x200 wp-post-image" alt=""> <?php } } else { if (has_post_thumbnail()) { echo get_the_post_thumbnail( $post->ID, array( 250, 200) ); } if ($fimage = geodir_get_featured_image($post->ID, '', true, $post->featured_image)) { ?> <img width="200" src="<?php echo $fimage->src; ?>" class="attachment-250x200 wp-post-image" alt=""> <?php } </div> </div> <h1 class="entry-title geodir-big-header-title fn whoop-title"> <?php echo esc_attr(stripslashes($post->post_title)); ?>
I know i’ve missed something stupid here, where did i go wrong?
Please advise!
Thanks, UFJanuary 13, 2016 at 2:02 pm #68135In the code I give earlier, this part is commented out
if (has_post_thumbnail()) { echo get_the_post_thumbnail( $post->ID, array( 250, 200) ); }
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket