Hey guys!
How do I make the permalinks for post titles open in a new browser window for " feedwordpress "?
A total newbie here. I have a few post pages on my website that receive post using the plugin feedwordpress and i want to make the post title open in a new tab when a visitor click on them. I found this from the author’s website…
…but unfortunately, I don’t know how to edit the BB child theme. And i know I’m not supposed to touch the main theme.
I actually want to have local post (my post) open on the _self and have syndicated post open on _blank with this code provided by the author:
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class() ?>>
<h3 id="post-<?php the_ID(); ?>"><a href="<?php
the_permalink() ?>" rel="bookmark" title="Permanent
Link to <?php the_title_attribute(); ?>" <?php if
(is_syndicated()): ?>target="_blank"<?php endif;
?>><?php the_title(); ?></a></h3>
Any help is appreciate on how to achieve this. Thank you in advance!
btw…I love the beaver builder plugin and i recommend it to everyone.
Let me guide you on this, I believe you are using the child theme right now. First thing you have to do is open the BB theme and copy the file named “content.php” into the Child Theme folder. Then edit the content.php file in your Child Theme, go to line 12 and insert target="_blank" into the a href attribute. Example below.
Just save the file and you should be good to go. If you are still not sure about this, please provide your server FTP login details and your WordPress WP login. We’ll try to apply the changes for you.
I’ve applied the changes for you in your Child Theme. The post title should now open in a new Tab. You might want to study it a bit, check out your Child Theme and navigate to bb-theme-child\fl-builder\modules\post-grid\includes\post-feed.php . For more info on how it is done, please read this article on how to Overriding Built-In Modules. Let me know how it goes.
Hey KC,
Thank you much for the help. It is opening in new tab. The only thing is that it is opening post from my site in a new tab as well. I wanted it to open syndicated post in a new tab and post published by my site on _self but this is good too if it is not possible. i was trying to see where you made the change but still studying it. I will figure it out eventually.
Again, thank you very much
Hmm, I’m still trying to wrap my head around this, sorry about that. So you wanted to open syndicated posts in a new tab and I’ve already done that. However, you wanted to open posts published by you in the current tab. Could you confirm with me if that’s what you needed?
I’ll briefly explain to you about the changes I’ve made to your Child Theme. Following this guide Overriding Built-In Modules, I’ve created a folder in your Child Theme that overwrites the Blog Posts Module. Then, I’ve inserted target="_blank" into the a href attribute inside this file post-feed.phpline 5 which is located inside your Child Theme “bb-theme-child/fl-builder/modules/post-grid/includes/”