Home › Forums › Calendar Products › Events Calendar PRO › default image for event category
- This topic has 7 replies, 2 voices, and was last updated 9 years, 1 month ago by Barry.
-
AuthorPosts
-
March 30, 2015 at 10:30 am #951957alonsoParticipant
if you have not chosen image will show a default image.
how can I make the veranstaltungs each category has a different default image.
March 30, 2015 at 3:07 pm #952031BarryMemberHi Alonso,
I’m not quite sure which images you mean, can you clarify (is this in relation to the related events section on single event pages rather than categories)?
if you could provide a specific URL to an example of the problem – by private reply, if you prefer – that would be awesome 🙂
March 31, 2015 at 8:51 pm #952451alonsoParticipantwhos simply times should a category and a Featured image can inflict create the category.
 when an event now has no image on the picture to the class be accessedMarch 31, 2015 at 8:52 pm #952452alonsoParticipantwhen an event now has no image is the image of the category to be taken
April 1, 2015 at 7:07 am #952513BarryMemberOK, so if an event does not have a featured image, you wish it to inherit the featured image assigned to its parent category?
That sounds like a great idea and there are a few ways you might tackle this. One is by creating a template override for single-event.php and modifying/adding to the code surrounding:
<?php echo tribe_event_featured_image( $event_id, 'full', false ); ?>
Another is to use the tribe_event_featured_image hook to filter the output of the above function, something like this:
add_filter( 'tribe_event_featured_image', 'substitute_featured_img' ); function substitute_featured_img( $image_url ) { if ( ! empty( $image_url ) ) return $image_url; else return 'your-custom-image.png'; }
Of course, a little more work would be required to pull in the category image (I’m not sure how you’ve implemented that so can’t help much further on that count) – but I hope this gives you some ideas you can move forward with 🙂
April 1, 2015 at 8:01 am #952548alonsoParticipantthat sounds good
and how do I get for each category a different image
April 1, 2015 at 2:17 pm #952638BarryMemberAdding images to categories isn’t “natively” supported by WordPress – there do seem to be various plugins available to help with this that you might be worth checking out, though 🙂
April 20, 2015 at 7:11 am #956650BarryMemberHi!
It’s been a while so I’m going to go ahead and close this topic.
- Need help with anything else? Go right ahead and post a new topic, one of the team will be only too happy to help
- Still need help with this issue and need to re-open it? Again, please simply create a new topic and link to this one to provide the team with some context
Thanks!
-
AuthorPosts
- The topic ‘default image for event category’ is closed to new replies.