Title: Display date first
Last modified: August 31, 2016

---

# Display date first

 *  Resolved [ursie](https://wordpress.org/support/users/ursie/)
 * (@ursie)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/display-date-first/)
 * Took a long time to find this plugin! Thank you for making it.
 * Question re displaying the date:
 * Can I reverse the position of the Date so that it comes before and not after 
   a list item?
 * i.e. In my Concert post lists I’d like to put the date first.
 * Replace Terminal 5 Concert 17-03-2016
    with 17-03-2016 Terminal 5 Concert
 * Thanks again for awesome plugin.
 * Isla
 * [https://wordpress.org/plugins/wp-list-pages-by-custom-taxonomy/](https://wordpress.org/plugins/wp-list-pages-by-custom-taxonomy/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [piccart](https://wordpress.org/support/users/piccart/)
 * (@piccart)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/display-date-first/#post-7202283)
 * Hello Isla!
    thanks for your words and compliments!
 * the only way for achieving that, is to create a customized version of the template
   file which displays the widget.
 * you should create a duplicate of this file
    /plugins/wp-list-pages-by-custom-
   taxonomy/templates/pbytax_template.php
 * and then place the duplicate into your theme main folder.
    then open this duplicate
   and look for this bit of code:
 *     ```
       <span class="postbytax-title-wrap"><a class="pbytax-post-title" href="<?php echo esc_url( get_permalink( $pbytax_post->ID ) ); ?>" title="<?php echo esc_attr( $pbytax_post->post_title ); ?>"><?php echo $pbytax_post->post_title ?></a></span>
                                       <?php if ($display_date=="yes"){
                                           ?>
                                           <span class="pbytax-date"><?php echo get_the_date( 'd-m-Y', $pbytax_post->ID ); ?></span>
                                       <?php } ?>
       ```
   
 * you have to invert the title and date bits, so it would look like this:
 *     ```
       <?php if ($display_date=="yes"){
                                           ?>
                                           <span class="pbytax-date"><?php echo get_the_date( 'd-m-Y', $pbytax_post->ID ); ?></span>
                                       <?php } ?>
       <span class="postbytax-title-wrap"><a class="pbytax-post-title" href="<?php echo esc_url( get_permalink( $pbytax_post->ID ) ); ?>" title="<?php echo esc_attr( $pbytax_post->post_title ); ?>"><?php echo $pbytax_post->post_title ?></a></span>
       ```
   
 * last thing to do is to add a css tweak because by default the date is aligned
   on rightside.
    place this in your style.css or in a custom css editor of your
   template options, if you have any
 *     ```
       ul.pbytax-list li.pbytax-item .pbytax-date {
          float:left;
       }
       ```
   
 * have a try and let me know if you have doubts or problems
    cheers!

Viewing 1 replies (of 1 total)

The topic ‘Display date first’ is closed to new replies.

 * ![](https://ps.w.org/wp-list-pages-by-custom-taxonomy/assets/icon-256x256.jpg?
   rev=1256692)
 * [WP LIST PAGES BY CUSTOM TAXONOMY](https://wordpress.org/plugins/wp-list-pages-by-custom-taxonomy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-list-pages-by-custom-taxonomy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-list-pages-by-custom-taxonomy/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-list-pages-by-custom-taxonomy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-list-pages-by-custom-taxonomy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-list-pages-by-custom-taxonomy/reviews/)

## Tags

 * [display date](https://wordpress.org/support/topic-tag/display-date/)

 * 1 reply
 * 2 participants
 * Last reply from: [piccart](https://wordpress.org/support/users/piccart/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/display-date-first/#post-7202283)
 * Status: resolved