Hey Tom,
I’m using a plugin called VK Link Target Controller that allows post links to open in another page instead of to the target post. I use this for displaying a news feed where some news items open in the post and others open in a PDF. You can see an example on the home page of dev.northwestfiretraining.com
My problem is that there is a box to check in the plugin that allows the individual post to other in a new page or just open in the same window. I have the box checked for the ones opening with PDFs to open in a new box, however they still open in the current window.
I checked the developers page and they show the following for a reason why this might happen:
My link won’t open on a new window.
VK Link Target Controller adds a filter on the the_permalink() WordPress function, which means the redirection won’t work if your theme uses another function, for example get_permalink() to display the links. In order to have the link opened in a new window VK Link Target Controller needs a theme with the post id as id on the <a>
parent element.
Your theme probably has it if it follows the WordPress Theme recommendations.
Example:
<div class="post-item post-block front-page-list">">
<a>">
<?php the_title(); ?>
</a>
</div>
Is this the case with GeneratePress? And if so, are you aware of a way to make the target work properly?
Thank you so much!
– Dave