[Resolved] Unable to communicate back with site to check for fatal errors

Home Forums Support [Resolved] Unable to communicate back with site to check for fatal errors

Home Forums Support Unable to communicate back with site to check for fatal errors

Viewing 10 posts - 16 through 25 (of 25 total)
  • Author
    Posts
  • #2402797
    MD Tohidul

    No error is showing, just the code is not working. Check the screenshot:

    https://prnt.sc/sN2CGYqUF4on

    #2402955
    Leo
    Staff
    Customer Support

    Can you make sure the code is indeed activated?

    Have you tried clearing the plugin first?

    Let me know ๐Ÿ™‚

    #2403227
    MD Tohidul

    I don’t know what do you mean by clearing the plugin first. Can you please explain it for me?

    Also, for your better understanding I have given the details in the private information.

    #2403228
    MD Tohidul

    I always clear the cache after something on my site. And, I am using Ezoic cache options for that! check the screenshot below

    https://prnt.sc/Ol9vWgaVoylj

    #2403230
    MD Tohidul

    I request you to give the proper solution to solve this issue as soon as possible. I have given all my information in the above. If you need anything else, I can provide you. Make sure that my problem is solved !

    #2403432
    David
    Staff
    Customer Support

    Please refrain from making unreasonable demands, we are trying to assist you with adding custom code to your site. This is not our issue, and we are only trying to assist.

    Can you first provide a link to a page on your website where we can see the date that you want to change?

    #2406823
    MD Tohidul

    I am not using any caching plugin. Also, there is no error message showing.

    The fact is after adding the code on snippets plugins, it’s not working.

    I want to show my post last updated date on article, I tried with the code snippet but its not working.

    HELP!!!

    #2407130
    Ying
    Staff
    Customer Support

    https://prnt.sc/aMCUiOOU4l3a this is not the GP function, and the function doesn’t look right.

    Can you use this snippet instead?
    https://generatepress.com/forums/topic/unable-to-communicate-back-with-site-to-check-for-fatal-errors/#post-2396443

    add_filter( 'generate_post_date_output', function( $output, $time_string ) {
    $time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">Published on: %2$s</time>';
    
    if ( get_the_date() !== get_the_modified_date() ) {
    $time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">Last Updated on: %4$s</time>';
    }
    
    $time_string = sprintf( $time_string,
    esc_attr( get_the_date( "c" ) ),
    esc_html( get_the_date() ),
    esc_attr( get_the_modified_date( "c" ) ),
    esc_html( get_the_modified_date() )
    );
    
    return sprintf( '<span class="posted-on">%s</span> ',
    $time_string
    );
    }, 10, 2 );

    And can you link us to a post that has an updated date?

    #2408735
    MD Tohidul

    Thanks Finally updated date is showing, GOD BLESS YOU ~

    #2408856
    Ying
    Staff
    Customer Support

    Glad to hear that ๐Ÿ™‚

Viewing 10 posts - 16 through 25 (of 25 total)
  • You must be logged in to reply to this topic.