entry: updated published for static page

Home Forums Support entry: updated published for static page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #116152

    Dear Tom,
    your job is amazing πŸ™‚

    I have a little suggestion, my site use only static pages and my searchconsole in Google complain the lack of author, published and updated fields in the hatom/entry tag, I solved putting the following in the content-page.php after entry-title:

    echo ‘


    $time_string = ‘<time class=”published” datetime=”%1$s” >%2$s</time>’;
    time_string .= ‘<time class=”updated” datetime=”%3$s” >%4$s</time>’;

    $date = date(‘c’, time());

    $time_string = sprintf( $time_string,
    esc_attr( get_the_date( ‘c’ ) ),
    esc_html( get_the_date( ‘c’ ) ),
    esc_attr( $date ),
    esc_html( $date ));

    echo $time_string;

    echo ‘<span class=”author vcard”><span class=”fn org”>Your Name</span></span>’;

    echo ‘

    Could it be putted in the next update so to avoid modifing again the code or something equivalent so solve the problem?

    Thank you very much πŸ™‚


    note: everything was enclosed in “div style display none” but this forum parser removed it

    Lead Developer
    Lead Developer

    In general, pages don’t usually have a visible author name. If I were to add this in the next update, I would probably get quite a few angry people asking me why their author name was all of sudden showing on their pages.

    Those three fields (author, published date and modified date) are typically only present on blog posts – GP does add them there by default.

    Of course, as long as you added the above code into your child theme, it will work perfectly for you going forward, even if you update GP πŸ™‚

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.