【发布时间】:2015-11-02 08:24:46
【问题描述】:
我是 Wordpress 的新手。我收到此错误:
注意:试图在 /mnt/stor10-wc1-ord1/825767/iucn.oceanic.net.fj/web/content/wp-content/plugins/super-socializer/super_socializer.php 中获取非对象的属性第 486 行
这是由我正在使用的“Super Socializer”插件引起的。它适用于其他页面,但我创建了一个自定义帖子类型并有 3 个类别。链接将其带到类别模板。例如:链接 a 显示类别 A 的帖子,链接 B 显示类别 B 的帖子等,
我的分类临时代码是这样的:
<?php
$args = array(
'posts_per_page' => 10,
'post_status' => 'publish',
'post_type' => 'oursuppliers',
'cat' => 35
);
query_posts($args);
?>
<?php
if ( have_posts() ): while ( have_posts() ) : the_post();
$post_title = get_the_title();
$post_author = $post->post_author;
$post_date = $post->post_date;
$link = get_field("resource-uploader");
$post_thumbnail_id = get_post_thumbnail_id( $id );
$thumbnail = wp_get_attachment_image_src( $post_thumbnail_id, "thumbnail");
$thumbnail = $thumbnail[0];
if( empty($thumbnail) ){
$thumbnail = get_template_directory_uri() . "/resources/images/default-150x150.jpg";
}
?>
<div >
<ul style="list-style: none; ">
<li style="display: inline; margin: 3%; height: 350px; " class="col-md-3">
<div>
<h5 style="font-weight: bold; color: #003399"><?php the_title() ?></h5>
</div>
<div>
<a href="<?php the_permalink(); ?>"> <img style="width: 150px; height: 150px; align-content: center;" src="<?php echo get_field("supplier_logo") ?>"/></a>
</div>
</li>
</ul>
</div>
<?php endwhile; endif; wp_reset_query(); ?>
</div>
谁能指导我如何消除该错误。反正我不需要这个模板上的分享插件...
提前谢谢你:)
【问题讨论】:
标签: wordpress categories