Qapla
asked 4 months ago

Hi,
Please, do you know how to display the (clickable) tags of each article in the timeline? Thanks

2 Answers
DominicStaff
answered 4 months ago

you can open the themes/dw-timeline-pro/templates/content.php file then add the following code to the position that you want to show the Tag list. 

<?php
    $tags_list = get_the_tag_list( '', __( ', ', 'dw-timeline-pro' ) );
    if ( $tags_list ) {
      printf( '<div class="tags-links">' . __( '<h3>Tags</h3> %1$s', 'dw-timeline-pro' ) . '</div>', $tags_list
);
    }
    ?>
Qapla
answered 4 months ago

Hmm… I’ve tried to paste the code as above (and at other places) but it doesn’t work. 
 
<article data-year=”<?php echo get_the_date(‘Y’, get_the_id()); ?>” data-month=”<?php echo get_the_date(‘F’, get_the_id()); ?>” data-page=”<?php $page = get_query_var(‘paged’); echo  $page ? $page : 1; ?>” <?php post_class(); ?>>
  <div class=”entry-inner”>
    <?php if(has_post_thumbnail()) : ?>
    <div class=”entry-thumbnail”>
      <a href=”<?php the_permalink(); ?>”><?php the_post_thumbnail(); ?></a>
    </div>
    <?php endif; ?>
 
    <div class=”entry-format”><?php echo get_post_format_string(get_post_format()); ?></div>
 
    <header>
      <h2 class=”entry-title”><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h2>
      <?php get_template_part(‘templates/entry-meta’); ?>
 
 
<? php 
    $ tags_list = get_the_tag_list (”, __ (‘,’, ‘dw-timeline-pro’)); 
    if ($ tags_list) { 
      printf (‘<div class = “tags-links”> “. __ (‘ <h3> Tags </ h3>% 1 $ s ‘,’ dw-timeline-pro ‘).’ </ div> ‘, $ tags_list 
); 
    } 
    ?>
 
 
    </header>
 
    <div class=”entry-content”>
      <?php the_content( __(‘Read more’, ‘dw-timeline-pro’) ); ?>
    </div>
  </div>
</article>
 

Qapla
replied 4 months ago

Sorry sorry, it works!

Now, I’m just trying to have the same style than the categories…

Powered by DW Question & Answer Pro