emr*_*tar 9 php wordpress jquery shortcode twitter-bootstrap
我只想在我的wordpress主题菜单栏中添加一个短代码按钮来处理该bootstrap modal view功能.
我试过' Shortcodes in Menus'插件,但它不起作用.我找不到菜单中短代码的替代插件,所以我安装了' Bootstrap 3 Shortcodes'插件,它创建了按钮和模态视图内容,如我所愿.但我无法在我的菜单栏中添加短代码.
我努力尝试找到一些关于我的问题的答案.但遗憾的是不可能.
这是由Bootstrap 3 Shortcodes插件生成的模态短代码 ;
[modal text="Download Now" title="Veteriner Hekimlere Ula?man?n En Kolay Yolu" xclass="btn btn-primary btn-lg"]
<p style="text-align: center;"><img src="http://web-test.vetmapp.com/wp-content/uploads/sites/2/2016/08/vetmapp-logo-withtext.png" alt="Logo" width="200" height="300" /></p>
<h4 style="text-align: center;">VetMapp'i cihaz?n?za göre a?a??daki platformlardan cep telefonunuza ücretsiz olarak indirebilir ve hemen kullanmaya ba?layabilirsiniz.</h4>
<p style="text-align: center;">
<a href="https://itunes.apple.com/tr/app/vetmapp-acil-veteriner-klinikleri/id969463902?mt=8" target="_blank"><img src="http://web-test.vetmapp.com/wp-content/uploads/sites/2/2016/09/180x40xapple-store.png.pagespeed.ic.z0I7tHw8h6.png" alt="App Store'dan indir!" width="135" height="40" /></a>
<a href="https://play.google.com/store/apps/details?id=com.esmobileinc.vetmapp&hl=tr"
target="_blank"><img src="http://web-test.vetmapp.com/wp-content/uploads/sites/2/2016/09/180x40xgoogle_play.png.pagespeed.ic.31v8JAmtbI.png" alt="Google Play'den indir!" width="135" height="40" /></a>
<a href="https://www.microsoft.com/tr-tr/store/p/vetmapp/9nblggh4s3qm"
target="_blank"><img src="http://web-test.vetmapp.com/wp-content/uploads/sites/2/2016/09/180x40xwindows_phone.png.pagespeed.ic.xvoiaCiuDP.png" alt="Windows Store'dan indir!" width="135" height="40" /></a>
</p>
[modal-footer] [button type="primary" style="border: solid 1px #18bda3; background-color: #fff; color: #18bda3;" link="#" data="dismiss,modal"]Kapat[/button] [/modal-footer] [/modal]
Run Code Online (Sandbox Code Playgroud)
我只想用[modal text="Download Now" title="Veteriner Hekimlere Ula?man?n En Kolay Yolu" xclass="btn btn-primary btn-lg"]成WP导航栏.
我怎样才能做到这一点 ?我可以在functions.php中为此编写一个函数,或者尝试另一种方法吗?
谢谢...
function my_function_name($item_output) {\n if( YOUR LOGIC FOR WHEN YOU WANT IT )\n $item_output .= do_shortcode(\'[modal text="Download Now" title="Veteriner Hekimlere Ula\xc5\x9fman\xc4\xb1n En Kolay Yolu" xclass="btn btn-primary btn-lg"]\');\n\n return $item_output;\n}\nadd_filter(\'wp_nav_menu\', \'my_function_name\', 10, 1);\nRun Code Online (Sandbox Code Playgroud)\n
| 归档时间: |
|
| 查看次数: |
758 次 |
| 最近记录: |