drbxr86044 2019-07-03 13:01
浏览 193

在Wordpress中更改以前帖子和下一个帖子链接的URL

I'd like to change the URL of the <?php previous_posts_link ?> and <?php next_posts_link ?> that are being outputted by Wordpress.

Problem:

When I am on my single page, I am getting this kind of an url:

http://example.com/post-title/2/

What I like to achieve:

When I am on my single page, I would like to get:

http://example.com/2/

So, the URL without the post title!

I don't know if this is even possible, but I'd like to understand if this is doable or not.

Could someone help me out here, please?

  • 写回答

2条回答 默认 最新

  • dsvbtgo639708 2019-07-03 13:12
    关注

    Get next/previous post object using get_previous_post() & get_next_post() and build your custom url.

    评论

报告相同问题?

悬赏问题

  • ¥20 SQL server表计算问题
  • ¥15 C# P/Invoke的效率问题
  • ¥20 thinkphp适配人大金仓问题
  • ¥20 Oracle替换.dbf文件后无法连接,如何解决?(相关搜索:数据库|死循环)
  • ¥15 数据库数据成问号了,前台查询正常,数据库查询是?号
  • ¥15 算法使用了tf-idf,用手肘图确定k值确定不了,第四轮廓系数又太小才有0.006088746097507285,如何解决?(相关搜索:数据处理)
  • ¥15 彩灯控制电路,会的加我QQ1482956179
  • ¥200 相机拍直接转存到电脑上 立拍立穿无线局域网传
  • ¥15 (关键词-电路设计)
  • ¥15 如何解决MIPS计算是否溢出