php - 语法错误 - 整天都在试图解决这个问题
问题描述
解析错误:语法错误,第 65 行 C:\Users\Dana\Local Sites\true-crime-community\app\public\wp-content\themes\makua\page.php 中的文件意外结束
但我无法弄清楚出了什么问题或如何解决它。不管我做什么。有人可以解释错误以及如何解决吗?我正在学习编码。
<?php
get_header();
while(have_posts()) {
the_post(); ?>
<div class="page-banner">
<div class="page-banner__bg-image" style="background-image: url(<?php echo get_theme_file_uri('/images/ocean.jpg') ?>);"></div>
<div class="page-banner__content container container--narrow">
<h1 class="page-banner__title"><?php the_title(); ?></h1>
<div class="page-banner__intro">
<p>Dont forget to replace me later!</p>
</div>
</div>
</div>
<div class="container container--narrow page-section">
<?php
$theParent = wp_get_post_parent_id(get_the_ID());
if ($theParent) { ?>
<div class="metabox metabox--position-up metabox--with-home-link">
<p><a class="metabox__blog-home-link" href="<?php echo get_permalink($theParent); ?>"><i class="fa fa-home" aria-hidden="true"></i>Back to<?php echo get_the_title($theParent); ?></a> <span class="metabox__main"><?php the_title(); ?></span></p>
</div>
<?php }
?>
<?php
$testArray = get_pages(array(
'child_of' => get_the_ID()
));
if ($theParent or $testArray) { ?>
<div class="page-links">
<h2 class="page-links__title"><a href="<?php echo get_permalink($theParent); ?>"><?php echo get_the_title($theParent); ?></a></h2>
<ul class="min-list">
<?php
if ($theParent) {
$findChildrenOf = $theParent;
} else {
$findChildrenOf = get_the_ID();
}
wp_list_pages(array(
'title_li' => NULL,
'child_of' => $findChildrenOf
));
?>
</ul>
</div>
<div class="generic-content">
<?php the_content(); ?>
</div>
</div>
<?php }
get_footer();
?>
解决方案
推荐阅读
- r - 如何根据数字天值添加月份列
- python - TensorFlow 中的逐行相关
- python - Django 过滤器。什么更有效 - .filter(date__range) 或 .all() 并通过 Python 过滤
- python - 使用谷歌云Text2Speech时如何选择复音字(中文)的读音?
- asp.net-core - MassTransit ISendEndpoint.Send method doesn't throw exception when RabbitMQ is unreachable
- c# - 如何使用 .NET 5 获取跨平台系统型号名称?
- c# - 在 Asp.net 核心中本地化 DataAnnotations
- flutter - 如何在颤动中获得两次之间的时间?
- docker - 容器不再可以从外部访问(尽管 localhost 有效)
- android - Android 房间数据库迁移