我已经用商品名称创建了自定义帖子类型。现在, 我的目标是为要添加的所有产品使用模板文件。
我正在使用Sage开发主题。
到目前为止, 我已经在主题的根目录中创建了一个名为single-product.php的文件, 如下所示:
<?php get_template_part('templates/product-single', get_post_type()); ?>
我的模板/单个产品看起来像这样:
<?php while (have_posts()) : the_post(); ?>
<h1>hey</h1>
<?php endwhile; ?>
因此, 从理论上讲, 当我进入产品页面时, 我会看到嘿。不幸的是我得到这个错误:
找不到很抱歉, 但你尝试查看的页面不存在。
有人知道我在这里做错了吗?
#1
我修好了它。
我必须刷新重写设置。一种快速的方法是保存永久链接设置。
来源:
https://www.srcmini02.com/66291.html
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_37117.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57