Support » Plugin: TM Timeline » I wanted to change the timeline title to icon

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Zemez

    (@templatemonster-2002)

    Hey, netpointdesigns!

    Can you please describe what title do you want to change?
    Currently the timeline uses the titles from the timeline posts (TM Timeline -> Posts).

    Thanks

    I need to make it look like this. Unfortunate as well I need to make the content only appear when its clicked defaulting to first date.

    Plugin Author Zemez

    (@templatemonster-2002)

    You can try to overwrite the horizontal layout for that.

    Step 1:

    To do that you should create a file called ‘tm-timeline_horizontal.php’ inside your theme.

    OR

    Create a filter called ‘tm_timeline_view_file‘ which will look like the following:

    function my_custom_timeline_layout( $original_layout_filepath ) {
    return ‘path/to/my-custom-layout.php’;
    }

    add_filter( ‘tm_timeline_view_file’, ‘my_custom_timeline_layout’ );

    Step 2:

    You can take a look at the original horizontal layout file placed in the plugin directory: /views/horizonal.php

    Simply copy it’s content into your new file.

    Step 3:

    Modify the layout like you require. You can use an image attached to the post for the icon.
    Simply use the ‘get_attachment_link‘ function to retrieve it.
    You also probably have to write some JS code to toggle the content visibility.

    Following variables are available inside the layout file:

    $this->pages – an array of pages of posts (WP_Post objects). Amount of pages is controlled by the ‘Visible items limit’ option.

    $this->config – an array of plugin options.

    • This reply was modified 1 year, 3 months ago by  Zemez.
    • This reply was modified 1 year, 3 months ago by  Zemez.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I wanted to change the timeline title to icon’ is closed to new replies.