default image for event category

Home Forums Calendar Products Events Calendar PRO default image for event category

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #951957
    alonso
    Participant

    if you have not chosen image will show a default image.

    how can I make the veranstaltungs each category has a different default image.

    #952031
    Barry
    Member

    Hi 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 🙂

    #952451
    alonso
    Participant

    whos 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 accessed

    #952452
    alonso
    Participant

    when an event now has no image is the image of the category to be taken

    #952513
    Barry
    Member

    OK, 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 🙂

    #952548
    alonso
    Participant

    that sounds good

    and how do I get for each category a different image

    #952638
    Barry
    Member

    Adding 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 🙂

    #956650
    Barry
    Member

    Hi!

    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!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘default image for event category’ is closed to new replies.