Title: Site Header shows class-wp-rest-comment-meta-fields php code
Last modified: December 13, 2020

---

# Site Header shows class-wp-rest-comment-meta-fields php code

 *  Resolved [alwiggins](https://wordpress.org/support/users/alwiggins/)
 * (@alwiggins)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/site-header-shows-class-wp-rest-comment-meta-fields-php-code/)
 * I am working to repair a hacked site for a friend. The hosting provider scans
   show the site is now free of malware, however there are lingering problems. first
   is the the fact that the code for the class-wp-rest-comment-meta-fields.php file
   shows up at the top of all pages. I haven’t quite been able to figure that out.
 * I am also unable to access the admin panel. While the provider malware scans 
   come back clean, attempting to access wp-admin yields a redirect and warning 
   that the site is unsafe.
 * Let’s tackle one thing at a time. can anyone explain why I am get rest api code
   in my header.
 * Thanks,
    Craig
    -  This topic was modified 5 years, 5 months ago by [alwiggins](https://wordpress.org/support/users/alwiggins/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsite-header-shows-class-wp-rest-comment-meta-fields-php-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/site-header-shows-class-wp-rest-comment-meta-fields-php-code/#post-13784164)
 * Try [downloading WordPress](https://wordpress.org/download/) again, access your
   server via [SFTP or FTP](https://wordpress.org/support/article/ftp-clients/),
   or a file manager in your hosting account’s control panel (consult your hosting
   provider’s documentation for specifics on these), and delete then replace your
   copies of everything on the server **except** the wp-config.php file and the /
   wp-content/ directory with fresh copies from the download. This will effectively
   replace all of your core files without damaging your content and settings.
 * Some uploaders tend to be unreliable when overwriting files, so don’t forget 
   to delete the original files before replacing them.
 * If that makes no difference, try [manually resetting your plugins](https://wordpress.org/support/article/faq-troubleshooting/#how-to-deactivate-all-plugins-when-not-able-to-access-the-administrative-menus)(
   no Dashboard access required). If that resolves the issue, reactivate each one
   individually until you find the cause.
 * If that does not resolve the issue, access your server via [SFTP or FTP](https://wordpress.org/support/article/ftp-clients/),
   or a file manager in your hosting account’s control panel (consult your hosting
   provider’s documentation for specifics on these), navigate to /wp-content/themes/
   and rename the directory of your currently active theme. This will force the 
   default theme to activate and hopefully rule-out a theme-specific issue (theme
   functions can interfere like plugins).
 *  Moderator [Dion Hulse](https://wordpress.org/support/users/dd32/)
 * (@dd32)
 * Meta Developer
 * [5 years, 5 months ago](https://wordpress.org/support/topic/site-header-shows-class-wp-rest-comment-meta-fields-php-code/#post-13784277)
 * > however there are lingering problems. first is the the fact that the code for
   > the class-wp-rest-comment-meta-fields.php file shows up at the top of all pages.
 * You may find that’s just because the first line of that file is no longer `<?
   php`, if you add that on it’s own line at the start it may fix that problem, 
   and allow you to login.
 * Do not consider it fixed at that point though, I strongly recommend you follow
   the above advice and re-install WordPress files, although using the “Reinstall
   WordPress” button in the Updates section of the dashboard should resolve core
   files being modified/invalid. And continue to run malware scanners on the site
   afterwards.
 *  Thread Starter [alwiggins](https://wordpress.org/support/users/alwiggins/)
 * (@alwiggins)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/site-header-shows-class-wp-rest-comment-meta-fields-php-code/#post-13793510)
 * [@macmanx](https://wordpress.org/support/users/macmanx/) thanks for your input.
   –
   I made a full copy of my current public_html folder and files – then downloaded
   and unzipped the current WP ver 5.6. – deleted everything in public-html with
   exception of /wp-content/ and wp-config.php/ – uploaded all new WP 5.6 files 
   with exception of /wp-content/ – have tried disabling all plugins by renaming/
   plugins/ to /plugin_/ also tried disabling them individually. – tried disabling
   the current active child-theme and its parent theme.
 * These steps have provided mixed results. I am still unable to access the admin
   panel, however the site did come back up – kind of. I have to type the full path..
   i.e. [https://noteworthy-music-studios.com](https://noteworthy-music-studios.com).
   simply entering noteworty-music-studios.com yields a blank screen. (I think this
   is because it adds www. to it. I will work with hosting company on that matter.)
   When I add the https:// the site comes up because it doesn’t allow www.
 * adding /wp-admin yields a blank screen. adding wp-login.php brings up the login
   screen but passwords aren’t recognized. requesting password change sends email
   but the link back just brings up a blank page.
 * Also unable to use cpanel to access the admin panel so I will be working with
   the hosting company.
 * Thanks for your guidance, it was helpful to a degree.
 * Craig
 *  Thread Starter [alwiggins](https://wordpress.org/support/users/alwiggins/)
 * (@alwiggins)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/site-header-shows-class-wp-rest-comment-meta-fields-php-code/#post-13793526)
 * [@dd32](https://wordpress.org/support/users/dd32/) thank you for the comment.
   the first line did include <?php. the error went away, but at this point I honestly
   don’t recall exactly what I did to clear it.
 * Thanks
 *  Thread Starter [alwiggins](https://wordpress.org/support/users/alwiggins/)
 * (@alwiggins)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/site-header-shows-class-wp-rest-comment-meta-fields-php-code/#post-13798786)
 * [@macmanx](https://wordpress.org/support/users/macmanx/): Site problems resolved
   with your assistance and a bit of elbow grease. thank you

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Site Header shows class-wp-rest-comment-meta-fields php code’ is closed
to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [alwiggins](https://wordpress.org/support/users/alwiggins/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/site-header-shows-class-wp-rest-comment-meta-fields-php-code/#post-13798786)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
