Newsmag: Opening posts in a separate tab or window

Posted in: Newsmag
Post count: 68

Hi – Is there a way to get an article (post) to open in a new tab or window, instead of forcing the user to hit the ‘back’ button to return to a list of posts?

I don’t find any settings for it in Newsmag.

Post count: 23312

Hi,

Unfortunately, there is no option for this at the moment. If you edit the PHP files you will make all posts open in new tabs. If this is what you want, you can add
target=”_blank”

here: http://screencast.com/t/4W7ikxysFjDy
Simply add it before the closing bracket for the tag.

I hope this helps.

Thank you!

Post count: 68

Thank you! I looked inside of (mysite) > wp-content > themes > newsmag > includes > modules > (and there is a long list of td_module_xx.php items)…

…but there is no single item called ‘td_module.php’ in the list.

Take a look… Which item should I edit? I want to be able to click any individual blog article so it appears in a separate window. I do not want this behavior for site pages. Just for individual articles, so if I click on the title of the article, the entire article appears in a new window.

Is there one place to put target=”_blank” that will work that way?

Thanks.

Post count: 23312

Hi,

I do not exaclty understand why this advice is not good for you because of the exact same do. When you are on the blocks (a block contains more modules) and when you click on posts from that block, that post will appear on the new tab. If is not what you mean, please provide more details so I will be able to provide a more accurate response.

Thank you!

Post count: 42

Hi

I set this in the td_module.php file 2 days ago and it was working fine opening all article links in a new tab.
Today it no longer opens in a new tab..
Only difference is that I set to open the menus in a new tab as well..ie under Appearance -> Menus -> We marked all menus to open link in new tab.
Now the menus open in a new tab but not the articles on the front page or any page…

This it the td_module.php code
$buffy .= 'href . '" rel="bookmark" class="td-image-wrap" title="' . $this->title_attribute . '"target=”_blank”>';

Post count: 42

follow

Post count: 23312

Hi,

Please try this fix from here -> https://www.screencast.com/t/IatLvA4GRmsf I have tested it and should works as expected.

Thank you!

Post count: 42

While this works now, unfortunately now, everytime you click on a link a new tab opens whereas earlier only the first time you clicked a link a new tab opens..

The first workaround opened 1 new tab and every click after that opened in the same new tab..

Post count: 23312

Hi,

However, if you want your post to be opened into another tab, you need to follow the second hint with the target blank, like this -> https://www.screencast.com/t/jINrryzjh Please be careful to the quotes to be the same with the code from here ->
https://pastebin.com/Ckrhn3Y6 That’s the solution if you want your posts to be opened into another tab. If is not what you mean, please provide more details about this so I will be able to provide a more accurate response.

I look forward to helping you!

Thank you!

Post count: 42

It is what I’m looking for. However the initial solution from 15th of April worked with opening ONE new tab and every new click would open within that same new tab. But when I also set the main menus to open in a new tab, then the articles didn’t open in a new tab at all anymore.

With the 2nd solution EVERY time you click a link, a new tab is open which will make you end up with several tabs open.

Post count: 20688

Hi,

From what I can see both solutions are the same, the first one mentioned a modification in this file – http://prntscr.com/ob0t82 which is the main td_module file. The second screenshot is with the same file – http://prntscr.com/ob0ty2

Adding that property to the link there, will affect all modules in the theme, every time the title is clicked, regardless of where it is located. That is supposed to happen.

Other than this modification, there would be no alternative. A setting for it does not exist currently. Maybe with a plugin that can be set to open internal links in new tabs, if there are any. I can’t make any recommendations unfortunately. Sorry for the inconvenience.

Thanks

Viewing 11 posts - 1 through 11 (of 11 total)
The forum ‘Newsmag’ is closed to new topics and replies.