WordPress Cherry 3.x. 如何使阅读更多的链接“post_grid”短代码在新选项卡打开
2015年4月6日
本教程展示了如何进行编辑 posts_grid 短码 so that 阅读更多 链接和 职位名称 新开业 tab.
WordPress. 如何使阅读更多的链接“post_grid”短代码在新选项卡打开
为了改变 短码 行为时,您需要编辑 短码 中的源代码 儿童主题, i.e. in the wp-content /主题/ themeXXXXX /包括 目录 在服务器:
-
打开 wp-content /主题/ themeXXXXX /包括 目录 看看是否已经有了 短码/ posts-grid.php 服务器上的文件.
-
如果文件丢失,请打开 custom-函数.php 存档并检查是否已经有了 posts_grid 文件中的代码:查找posts_grid Ctrl / Cmd + F5 hotkeys.
-
如果代码丢失,打开 posts-grid.php 文件位于 wp-content / plugins /樱桃-plugin包括/短码 目录 在服务器上复制开头的代码:
函数posts_grid_短码($ ats, $content = null, $短码name = ") {
结尾是:
add_短码(“posts_grid”、“posts_grid_短码”);
-
将代码粘贴在底部 custom-函数.php 在交易结束前提交 ?> tag. 将更改保存在文件中.
-
在源代码中找到帖子标题链接:
'; $output .= get_the_title($post_id); $output .= '
-
以便在新打开链接 tab, add 目标= "平等" 进入链接代码:
'; $output .= get_the_title($post_id); $output .= '
-
要修改 阅读更多内容按钮 链接,找到按钮链接代码,如下:
'; $output .= $link_text; $output .= '
-
添加相同的 目标= "平等"属性 链接代码:
'; $output .= $link_text; $output .= '
-
将更改保存在 custom-函数.php file. 用Ctrl / Cmd + F5热键刷新页面,查看网站上的变化.
请随时查看下面的详细视频教程: