Support Forum

Blog Post Linking Plug-in

SV sorlac vasquez
sorlac vasquez
Member

Hello.

Using this plugin, I have the “Join the forum discussion on this post” link showing up on new posts. How can I specify this link to open in a new tab in the browser, so the reader does not leave my front page?

Effectively, I want a target=”_blank” appended to the link.

 

Thanks!

7 Answers

New Answer

MP Mr Papa
Mr Papa
Member

hmmm… doesnt appear you can…  normally exposed in template tag, but this one is automatic, no option for the tag…

I had at least hoped for an filter on the item so it could be modified but it doesnt have that…

I can open a ticket for an improvement, but afraid it would be quite complex until then…

SV sorlac vasquez
sorlac vasquez
Member

Yes, please submit the feature for future development.

Is there a brute-force solution I can implement in the meantime? I am not opposed to some code diving, if it is necessary.

MP Mr Papa
Mr Papa
Member

I made the change earlier this morning… If I can finish testing today or tomorrow, may be able to release it this weekend…

SV sorlac vasquez
sorlac vasquez
Member

I see that there is an update for the plug-in today. Is the feature now included?

MP Mr Papa
Mr Papa
Member

its a standard wp filter… so something like:

add_filter('sph_blog_link_label', 'my_link_function');
function my_link_function($out) {
    $out = str_replace('<a ', '<a target="_blank" ', $out);
    return $out;
}

added the spFunctions.php file of your sp theme…  as always, we urge you to create a child theme or a custom theme before making the edits…