又一款 wordpress 时间线插件 Timeline Express

文章目录

    Timeline Express 相比 Cool Timeline 更大气一些,虽然免费版比较弱,只能支持一个故事线,但是比起整站都用 Cool Timeline,多种风格的时间线看起来没那么单调。

    Timeline Express 挺适合做故事墙的。

    wordpress 时间线插件 Timeline Express

    https://wordpress.org/plugins/timeline-express/#description

    short code

    [timeline-express]
    

    将时间线中的内容调整为全文

    vim lib/helpers.php 
    
    function timeline_express_get_announcement_excerpt( $post_id ) {
            /* Setup the excerpt */
            //return apply_filters( 'the_content', apply_filters( 'timeline_express_frontend_excerpt', get_the_excerpt(), $post_id ) );
            return apply_filters( 'the_content', apply_filters( 'timeline_express_frontend_excerpt', get_the_content(), $post_id ) );
    }
    

    图标

    icon rebel

    免费的留白太多了

    确实不好看,得找找如何能在免费版的基础上调整的方案。

    妈的,等老子写完了。我就发布一个免费的插件,干死这几个付费的垃圾插件。

    可以使用动态调整

    margin-top: -888px;

    的方法,重复利用空间。

    vim ./lib/classes/class-timeline-express-initialize.php
    
    <?php
    while ( $announcement_query->have_posts() ) {
    	$announcement_query->the_post();
    	get_timeline_express_template( 'timeline-container' );
    	// reset the post data
    	wp_reset_postdata();
    }
    ?>
    
    <script>
    jQuery( document ).ready(function(){
            if ($(window).width() > 820) {
                    // 计算 margin-top 的代码
            }
    }
    );
    </script>
    

    关于作者 🌱

    我是来自山东烟台的一名开发者,有感兴趣的话题,或者软件开发需求,欢迎加微信 zhongwei 聊聊,或者关注我的个人公众号“大象工具”, 查看更多联系方式