如何创建指向自定义wordpress主题页面的链接?

时间:2020-03-04 17:19:39

标签: html wordpress wordpress-theming custom-wordpress-pages

我已经在Wordpress(自定义主题)上为父页面创建了四个自定义子页面:

父母:

  • Drawings.php

子链接:

  • Other.php
  • More.php
  • Paintings.php
  • Events.php

页面在浏览器中通过以下网址显示:

如何在父页面(http://localhost:8000/drawings)中创建四个链接到这些子链接?

我尝试仅通过url链接,就像这样:

<a class="link-1" href="http://localhost:8000/drawings/more/">| More |</a>

但是我收到一个错误:Page not found

1 个答案:

答案 0 :(得分:0)

您是否尝试过:<?php echo get_home_url() . '/drawings/more/'; ?> 相当确定它应该可以正常工作... gl。