[英]the_permalink not working? wp_list_pages
I'm trying to make wp list pages with thumbnails and other good stuff.我正在尝试使用缩略图和其他好东西制作 wp 列表页面。 But when i add the_permalink to my titles thumbnails etc and click on them, they are just refreshing the parent page and not getting the title(page) url.但是,当我将 the_permalink 添加到我的标题缩略图等并单击它们时,它们只是刷新父页面而没有获取标题(页面)url。 I'll insert what I have maybe someone knows how to fix it?我会插入我所拥有的,也许有人知道如何解决它? Will be happy for any help !将很乐意提供任何帮助! THANKS谢谢
What I have我拥有的
<div id="archive-thumbnails-listing" >
<?php $pages = get_pages(array('child_of' => 352)); ?>
<?php foreach ($pages as $page): ?>
<div class="thumb22">
<div class="thumb20"><a href="<?php the_permalink(); ?>">
<?php echo get_the_post_thumbnail($page->ID, 'full'); ?></a></div>
<div class="thumb19"><a href="<?php the_permalink(); ?>"><?php echo $page->post_title; ?></a></div>
</div>
<?php endforeach; ?>
</div>
try this: echo get_the_permalink($page->ID);
试试这个: echo get_the_permalink($page->ID);
<div class="thumb19"><a href="<?php echo get_the_permalink($page->ID); ?>"><?php echo $page->post_title; ?></a></div>
</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.