Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter supremero

    (@supremero)

    I changed line 237 to this:

    $dayToDisplay = $day . "<br><span class=event>" .  esc_attr( $ak_titles_for_day[ $day ] ) . "</span>";
    		if(sizeof($daywithpost[$day]) > 1){
    			$dayToDisplay = $day . "<br><span class=event>" . sprintf( __( '%s events', 'sportspress' ), ( sizeof( $daywithpost[ $day ] ) ) ) . "</span>";
    		}
    		$calendar_output .= '<a data-tooltip data-options="disable_for_touch:true" class="has-tip" href="' . ( sizeof( $daywithpost[ $day ] ) > 1 ? add_query_arg( array( 'post_type' => 'sp_event' ), get_day_link( $thisyear, $thismonth, $day ) ) . '" title="' . sprintf( __( '%s events', 'sportspress' ), ( sizeof( $daywithpost[ $day ] ) ) ) : get_post_permalink( $daywithpost[ $day ][0], false, true ) . '" title="' . esc_attr( $ak_titles_for_day[ $day ] ) ) . "\" itemprop=\"url\">" . $dayToDisplay . "</a>";

    Is almost what i needed… I would love to display all the events on a specified day, not “2 events”: https://prntscr.com/ofslv2

    Anyone who can help?

    Roch

    (@rochesterj)

    Hi!

    Thanks for reaching out!

    Unfortunately, this kind of customization is beyond the scope of our support. But I’ll leave this open in case another user or dev has any input on this.

    Thanks!

    Thread Starter supremero

    (@supremero)

    This should be the default view for a calendar in my opinion. Not showing the events on the calendar means at least one extra click from the user to reach that information…

    Roch

    (@rochesterj)

    Hi!

    Thanks for your reply.

    That’s a great idea indeed, but I don’t recall it being suggested before (I may be wrong though). It would be awesome if you could add it to our ideaboard:
    https://tboy.co/ideas

    Thanks!

    Thread Starter supremero

    (@supremero)

    Plugin Contributor Savvas

    (@savvasha)

    Hi @supremero ,

    An easy alternative is to use a 3nd party plugin to show your events in a calendar as you wish. For example, WP FullCalendar seems to do exactly what you want!

    Also please try to not alter core files of SportsPress. In the very next update you will need to maintain those changes… Use 3nd party plugins or child themes instead ??

    Thanks,
    Savvas

    Thread Starter supremero

    (@supremero)

    Hello @savvasha,

    I know, but i wanted to use the custom post type created by sportpress, to avoid the creation of another one. I’ll give it a try.

    I didn’t changed the core files, i made the changes in my theme.

    Thanks!

    Roch

    (@rochesterj)

    Awesome! I hope it works fine for you.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Add Event title to Calendar’ is closed to new replies.