• Hello,

    Not sure it is the right area to add my question. If I am wrong then please correct me.

    I am using a theme where I have used a code to show the tags in the Blog page as tags showing inside the page are not showing in the Blog page there. Here is the code I am using there to show the tags in Blog page:

    <div class="custom-category">
        <?php
          $post_tags_show_text = __('Tags', 'directory');
    
          $categories_list = get_the_term_list ( $cs_post_id, 'directory-tag', '<li>', '</li><li>', '</li>' );
    
          if ( isset($categories_list) ){ ?>
            <div class="cs-tags"> <!-- cs Tages Start -->
              <h5><?php echo esc_attr($post_tags_show_text);?></h5>
              <ul> <?php printf( __( '%1$s', 'directory'),$categories_list ); ?></ul>
            </div>
        <?php
         } ?>
    	</div>

    But irrespective of the order I add it in the backend, it is automatically sorts itself alphabetically. Can anyone please help me by adjusting the above code so that the tags will not sort alphabetically again. Sort by date is also okay.

    Thank you in advance.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Sort tag by date’ is closed to new replies.