[Resolved] code is displayed under post titles

Home Forums Support code is displayed under post titles

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1682357
    Eric

    My site is:
    https://www.patamystic.com

    I’m seeing a block of code under the title of all blog listings and individual post pages. This happened after I added a plugin called All in One WP Security. However, after deleting the plugin, the problem remained. I then restored from a back up from yesterday and the problem persisted. Then I restored a backup from a week ago and the problem persisted.

    I have disabled all plugins except GP Premium and WP Show posts. This is the code I’m seeing (which you can also see on the site):

    %1$s’, sprintf( ‘%4$s%3$s’, esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ), esc_attr( sprintf( __( ‘View all posts by %s’, ‘generatepress’ ), get_the_author() ) ), esc_html( get_the_author() ), get_avatar( get_the_author_meta( ‘ID’ ) ) ) ); $time_string = ‘%2$s’; if ( get_the_time( ‘U’ ) !== get_the_modified_time( ‘U’ ) ) { $time_string = $time_string . ‘%4$s’; } $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() ) ); printf( ‘%1$s’, // WPCS: XSS ok, sanitization ok. sprintf( ‘%3$s’, esc_url( get_permalink() ), esc_attr( get_the_time() ), $time_string ) ); if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ”; comments_popup_link( __( ‘Comments’, ‘generatepress’ ), __( ‘1 Comment’, ‘generatepress’ ), __( ‘% Comments’, ‘generatepress’ ) ); echo ”; } ?>

    Any ideas what’s wrong and how to fix it?

    #1682514
    Leo
    Staff
    Customer Support

    Hi there,

    I’m not seeing the issue in the link you’ve provided.

    Is the code added in a hook element?

    If so this is likely the issue:
    https://docs.generatepress.com/article/disallow-php-execution/

    #1682521
    Eric

    Yeah, I’m impatient so I kept troubleshooting after I posted this and managed to fix the problem by removing the theme module and re-installing it from scratch. Looks like you checked my site about 60 seconds after I fixed it. Thanks for checking.

    #1682709
    Leo
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.