V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
ysoserious
V2EX  ›  WordPress

wordpress 怎么让短代码临时失效

  •  
  •   ysoserious · Feb 19, 2016 · 3053 views
    This topic created in 3725 days ago, the information mentioned may be changed or developed.

    wordpress 里设置了 abc 短代码以后

    添加[abc]...[/abc]就会产生对应的效果

    请教各位,如果我想把这个短代码作为代码展示出来,有什么好的办法?

    就是直接在文中显示[abc]...[/abc]而不是让这段代码运行出来。

    我试过代码高亮插件,<pre>[abc]...[/abc]</pre>依然没用,短代码还是运行了。

    试过自带的[code]标签也无用

    2 replies    2016-02-19 19:23:40 +08:00
    alansalexer
        1
    alansalexer  
       Feb 19, 2016   ❤️ 1
    Use [[abc]]...[[/abc]].

    如果你用 “ Wordpress escape shortcodes" 作为关键词搜索的话,不难找到这个解决方案。
    ysoserious
        2
    ysoserious  
    OP
       Feb 19, 2016
    @alansalexer 十分感谢,经过测试 [[abc]...[/abc]]这样即可
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1508 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 16:22 · PVG 00:22 · LAX 09:22 · JFK 12:22
    ♥ Do have faith in what you're doing.