1. There is going to be scheduled downtime in the next few hours.

    We are physically moving servers and equipment to a data center that will give us 50x more bandwidth.
  2. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Missing Byline Text

Discussion in 'HTML & Website Design' started by kertoon, Apr 28, 2018.

  1. #1
    I tried adding the "Last updated on" code to my post php. But it appeared without the text "Last updated on, except the date and the author's name.

    In other words, the line "Last updated on" is missing. The code is still in both the post.php and single post.php.

    But when checked with Inspect Element, it showed only the date and the author's name.

    This is the code which I add to php:
    SEMrush
    <?php $u_time = get_the_time('U');
    $u_modified_time = get_the_modified_time('U');
    if ($u_modified_time >= $u_time + 86400) {
    echo "Last updated on ";
    the_modified_time('F jS, Y');
    echo ", "; }
    else {echo "Posted on "; the_time('F jS, Y');} ?>
     
    kertoon, Apr 28, 2018 IP
    SEMrush
  2. kertoon

    kertoon Well-Known Member

    Messages:
    141
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    131
    #2
    Problem solved.
     
    kertoon, Apr 29, 2018 IP