• Resolved AlfaOmega

    (@alfaomega)


    Hi,
    Is there a way to change the location of the data, right below the H1 header. I followed the instructions I found from an archived ticket on the same issue but it doesn’t work.

    Thanks a lot!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • I used this code to set up the meta information in my posts to be right under the featured image. I suspect that, if you edit it and place it with the meta data on your page, it would work for you.

    I did this in the loop-index.php. Make a copy of that file and put it into your child theme, then edit. Here’s the code:

    				/*
         * CHANGING THE META INFO FOR EACH POST TO INCLUDE PUBLISHED DATE AND LAST MODIFIED DATE
     	 */
                        echo "<span class='post-meta-infos'>";
                        echo "<time class='date-container minor-meta updated' >Published on ".get_the_time(get_option('date_format'))."</time>";
                        echo "<span class='text-sep text-sep-date'>/</span>";
                        echo do_shortcode( '[lmt-post-modified-info]' );
          /*              echo "<time class='date-container minor-meta updated'>Last modified on ".get_the_modified_time(get_option('date_format'), $the_id)."</time>";
           */     
    Thread Starter AlfaOmega

    (@alfaomega)

    I don’t have that file as a part of my theme.
    I could only find the post date code in my theme/library/core.php

    /*********************
    POST DATE
    *********************/
    if ( ! function_exists( 'cb_get_byline_date' ) ) {
        function cb_get_byline_date( $cb_post_id ) {
    
            $cb_date = NULL;
            $cb_meta_onoff = ot_get_option('cb_meta_onoff', 'on');
            $cb_byline_date = ot_get_option('cb_byline_date', 'on');
    
            if ( ( $cb_meta_onoff == 'on' ) && ( $cb_byline_date != 'off' ) ) {
    
                $cb_date = '<div class="cb-byline cb-byline-short cb-byline-date"><span class="cb-date"><time class="entry-date updated" datetime="' . get_the_modified_date('Y-m-d', $cb_post_id) . '">' . date_i18n( get_option('date_format'), strtotime( get_the_time('Y-m-d', $cb_post_id ) ) ) . '</time></span></div>';
    
            }
    
            return $cb_date;
        }
    }

    Ugh, I’m sorry. I’m not sure what to do otherwise. ??

    Plugin Author Sayan Datta

    (@infosatech)

    Hello @alfaomega ,

    Sorry for the late reply. Could you please tell me do you want to show both published date and modified date or just want to replace the published date with modified date below h1?

    Thanks!

    Thread Starter AlfaOmega

    (@alfaomega)

    Hi Sayan,
    Both would be great (Published on…followd by…Last updated on…)
    Keep up the great work

    Thread Starter AlfaOmega

    (@alfaomega)

    Hi Suyan
    Any update on the matter?
    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show ‘Last updated date’ below H1’ is closed to new replies.