如何在新标签页/窗口中打开每个Wordpress帖子? [英] How to open each Wordpress post in new tab/window?

查看:103
本文介绍了如何在新标签页/窗口中打开每个Wordpress帖子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个wordpress博客,其主页显示了10条最新帖子的列表.

I have one wordpress blog whose home page is showing a list of 10 latest posts.

现在,无论何时我想单击任何帖子标题,都会在同一选项卡中打开一个新帖子,但是在这里,我想让它在新选项卡中打开.那么,我该怎么做呢?

Now whenever I am going to click on any post title, a new post will open in the same tab, but here I want to let open it in a new tab. So, how can I do that?

推荐答案

编辑主题

/wp-content/themes/your-theme-name/loop.php

寻找帖子链接,例如...

look for post link eg...

<a href="<?php the_permalink(); ?>" class="read_more_link" ><?php echo __('Read more &raquo;'

添加target="_blank"属性

<a href="<?php the_permalink(); ?>" target="_blank" class="read_more_link" ><?php echo __(

每个Wordpress主题都有不同的html.只是搜索.. href="<?php the_permalink(); ?>"这是每个帖子的永久链接

each Wordpress theme have a different html. just search for.. href="<?php the_permalink(); ?>" this is permalink of each post

这篇关于如何在新标签页/窗口中打开每个Wordpress帖子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆