我在我的博客上设置了一个自定义帖子类型,并为分类法设置了一个特殊页面。在分类页面上,我收到以下错误。谁能给我一些有关如何解决此错误的提示?
该页面加载正常,并按我的预期工作。但是,如果我将调试设置为 true,则会出现以下错误。我想解决这个问题。我粘贴了循环中的成本,该循环在页面上以不同的标准运行了两次。
Notice: Trying to get property of non-object in /home3/ans/public_html/wp-includes/post-template.php on line 29
Run Code Online (Sandbox Code Playgroud)
代码:
<?php
query_single('dealers', 'publish', '1', $taxtype, $value);
?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php
$address=get_post_meta($post->ID, 'wpcf-street_address', TRUE);
$city=get_post_meta($post->ID, 'wpcf-city', TRUE);
$state=get_post_meta($post->ID, 'wpcf-state_abbreviation', TRUE);
$zip=get_post_meta($post->ID, 'wpcf-zip_code', TRUE);
$phone=get_post_meta($post->ID, 'wpcf-phone_number', TRUE);
$paid=get_post_meta($post->ID, 'wpcf-paid', TRUE);
$post_id=get_the_ID();
get_each_dealer_brand($post_id);?>
<?php
echo "<ul class=\"ullisting\">";
if($paid==1)
{
echo "<li><p class=\"plisting\"><strong><a href=\"";the_permalink(); echo "\">";the_title();echo "</a></strong></p></li>";
echo "<li><p class=\"plisting\">$address | $city, $state $zip</p></li>";
echo "<li><p class=\"plisting\">P: $phone</p></li>";
echo …Run Code Online (Sandbox Code Playgroud) 我正在学习R并且不理解以下功能的一部分.在下面的函数究竟是count=length(address)做什么的?还有另一种方法吗?
crime_dat = ddply(crime, .(lat, lon), summarise, count = length(address))
Run Code Online (Sandbox Code Playgroud)