About This Ticket

How do I edit timeline?

by CreativeTweed / September 11, 2017, 9:48 pm

The SoccerClub Timeline module only has a title box and free text field, how do I add new dates?

Hi guys,

Thanks for your help so far. Really can't work this one out, does this work in a simlar way to video scroller?

Staff

Create Awards from Awards post type and fill up necessary details in the post type meta fields such as achievements year, tournament details, weather info etc and allow it to Display in Timeline by checking the checkbox on. You can optionally make it featured to highlight the events associated with the date.

Thanks. Worked that out now.

The dates are in reverse order. Is it possible to change this?

Also, we don't have video for our awards. Can we use an image in timeline for featured awards instead (where the video appears)?

Staff

I found the timeline on the about page. Do You need the timeline to show in reverse order? That will take a little modification in the code. However, wouldn't it more meaningful to show the timeline events in a reverse chronological order? Please confirm. I found a few problems with your installation. The timeline is not showing the videos. Did you add videos to timeline achievements? The Latest Results on the homepage should show the meta about scoring players. Long list can be mangaged with some css changes.

OK let's run the timeline in the order you suggest.

With regards to videos, we do not have videos for any of the awards. We'd like to use images in place of the video. Is this possible?

Great news on being able to pull through fixtures entered in the custom post type Matches into Upcoming Fixtures. Can you let us know how we do this?

Staff

Great news on being able to pull through fixtures entered in the custom post type Matches into Upcoming Fixtures. Can you let us know how we do this?

Sorry but this feature is not available as of now, however we are planning a future version of the theme where we can integrate the post type with fixtures. 

To change the timeline to show featured image you will need to customize the soccerclub_vc_extensions plugin. Find the soccerclub_setup.php file in the theme folder (./inc/lib) and add this image size.. 

add_image_size( 'soccerclub-timeline-thumbnail', 570, 295, array( 'center', 'center' ) );

Then modify the front_end-timeline.php file in the plugin and modify the video block code to show the featured image when no video is given..

‚Äč
                if ( 'upload_video' == $video_option && '' != $upload_video ) {
                    $filetype = wp_check_filetype( $upload_video );
                    if ( in_array( $filetype['type'], array( 'video/mp4', 'video/webm', 'video/ogg' ) ) ) {
                        $videoblock =
                        '<div class="historyVideo">
                <div class="historyvideoContainer">
                  <video width="100%" controls>
                    <source src="' . $upload_video . '" type="' . $filetype['type'] . '"> 
                  <video>
                </div>
              </div>';
                    }
                } else if ( 'embed_video' == $video_option && '' != $embed_video ) {
                    $embed_frame = soccerclub_video_oembed( $embed_video );
                    $videoblock =
                        '<div class="historyVideo">
                <div class="historyvideoContainer">'
                            . $embed_frame .
                          '</div>
              </div>';
                } else {
                    $videoblock = 
                        '<div class="historyVideo">
                <div class="historyvideoContainer">'
                            . get_the_post_thumbnail( get_the_ID(), 'soccerclub-players-thumbnail' ) .
                          '</div>
              </div>';
                }