最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

links - Content -> Post is easy, but Post -> Content is hard

programmeradmin3浏览0评论

I have a CPT/Pods, so it makes Post to Country, but it's the almost identical.

Content to Post (or Country) is easy, example: /country/page/5 (Content) to /country/taiwan/ (Post).

while ( $query->have_posts() ) :
  $query->the_post();
  ?><a name="title<?php echo get_the_ID()?>"></a>
  <?php echo '<a href="'.esc_url( get_permalink() ).'">'.get_the_title()."</a>";
endwhile;

On Post (Country), I also wanted to go to the previous before. So how I go back /country/taiwan to /country/page/5#title58? I can not go to /country/page/5#title58, nor /country/page/5, only manual /country/.

<a href="/country/page/">Country</a>

Can you show me the -> Content, that is the function linking to /country/page/5#title58?

发布评论

评论列表(0)

  1. 暂无评论