• When you hover over an event in the calendar, it shows a large amount of text from the body of the event. I would like it to show my defined ‘excerpt’ instead. Is this possible?

Viewing 6 replies - 1 through 6 (of 6 total)
  • This would be really interesting. Is there a way to do this?

    Thread Starter namgostar

    (@namgostar)

    Cool! How did you do it?

    First let me say that the changes I did is at own risk. Be sure you have a backup of (at least) the plugin folder so you can always fall back to the original file.

    That said, the changes;
    Login to your Admin panel.
    There go to plugins -> editor.
    Then on the right upper corner of the edit field go to WP FullCalendar and choose select.
    Choose for wp-fullcalendar/wp-fullcalendar.php on the right side.

    Look for public static function qtip_content()
    My version looks like;
    public static function qtip_content(){
    $content = ”;
    if( !empty($_REQUEST[‘post_id’]) ){
    $post = get_post($_REQUEST[‘post_id’]);
    if( $post->post_type == ‘attachment’ ){
    $content = wp_get_attachment_image($post->ID, ‘thumbnail’);
    }else{
    $content = ( !empty($post) ) ? $post->post_excerpt : ”;
    $ptitle = ( !empty($post) ) ? $post->post_title : ”;
    if( get_option(‘wpfc_qtips_image’,1) ){
    $post_image = get_the_post_thumbnail($post->ID, array(get_option(‘wpfc_qtip_image_w’,75),get_option(‘wpfc_qtip_image_h’,75)));
    if( !empty($post_image) ){
    $content = ‘<h3>’.$ptitle.'</h3><div style=”float:left; margin:0px 5px 5px 0px;”>’.$post_image.'</div><p style=”font-size: 14px;”>’.$content.'</p>’;
    }
    }
    }
    }
    echo apply_filters(‘wpfc_qtip_content’, $content);
    die();
    }

    /**
    Good luck, and let me know the result.

    Thread Starter namgostar

    (@namgostar)

    This was perfect! Thank you so much!

    For anyone else who has stumbled accross this thread, here is the super simple solution:

    Find this line: $content = ( !empty($post) ) ? $post->post_content : ”;
    Replace it with this: $content = ( !empty($post) ) ? $post->post_excerpt : ”;

    Yeah!

    Must be not to hard to add this as an option in the Admin panel.
    So, this should be on the feature request list πŸ˜‰

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Show excerpt not full event’ is closed to new replies.