【问题标题】:How to create a link to a custom wordpress theme page?如何创建指向自定义 wordpress 主题页面的链接?
【发布时间】:2020-06-17 06:21:24
【问题描述】:

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

家长:

  • Drawings.php

子链接:

  • Other.php
  • 更多.php
  • Paintings.php
  • Events.php

这些页面在浏览器中通过这些 url 显示:

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

我尝试简单地通过 url 进行链接,如下所示:

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

但我得到一个错误:Page not found

【问题讨论】:

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


    【解决方案1】:

    你试过了吗:&lt;?php echo get_home_url() . '/drawings/more/'; ?&gt; 很确定它应该可以工作...... gl.

    【讨论】:

      猜你喜欢
      • 2014-06-08
      • 2012-04-18
      • 2023-03-03
      • 1970-01-01
      • 2019-04-12
      • 1970-01-01
      • 1970-01-01
      • 2016-07-08
      • 2016-11-12
      相关资源
      最近更新 更多