• This is used with the events-manager plugin. I wanted a default featured image for submitted events without a featured image. On installation together with the script to display the default featured image only on posts and not pages, it worked perfectly

    However on adding a new event with a featured image, all previous default featured images disappear.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter ddrj

    (@ddrj)

    additional to above – the Default featured image previously uploaded via settins/media is actually deleted from the Media Library – hence its disappearance.

    Plugin Author Jan-Willem

    (@janwoostendorp)

    Hi ddrj,

    Sorry for the late replay I was unavailable.
    Sorry to hear this, I havn’t heard about problems with event manager. Do you use event manager pro or free?

    I’ll setup a test enviroment later this week and test the free version on a clean WP installation.

    Can you share the exact script you used to exclude pages?

    Thread Starter ddrj

    (@ddrj)

    Thanks Jan

    I am using the free version of event manager.

    The script used to exclude pages is

    function dfi_posttype_page ( $dfi_id, $post_id ) {
    $post = get_post($post_id);
    if ( ‘page’ === $post->post_type ) {
    return 0; //invalid ID
    }
    return $dfi_id; // the original featured image id
    }
    add_filter( ‘dfi_thumbnail_id’, ‘dfi_posttype_page’, 10, 2 );

    This script is added to my themes function.php

    Plugin Author Jan-Willem

    (@janwoostendorp)

    I found the problem, It is a pure combination of DFI+Event Manager.

    I’m not sure when this happens. I could not find the settings to trigger this problem. But I know its there. Don’t know how nerdy you are but the code responsible is here.

    So now what.
    I can’t fix this. It’s in Event Manager. I’ve opened a ticket there and we will see how it goes from there.

    Thread Starter ddrj

    (@ddrj)

    I am very grateful for your time spent on this Jan and for posting a ticket in the EM support forum. I am new to WP so my coding ability is close to zero and support for the free version of EM is fairly limited. Your plugin was the last piece of the jigsaw.
    Lets hope EM respond to your ticket.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Default image disappears on upload of new post with featured image’ is closed to new replies.