Open ALL "Posts" from Main Loop in New Tab/Window.

Posted in: Newspaper
Post count: 16

Sorry I can’t figure this out from reading previous people who have clearly asked the same thing…

My main page has the most recent 40 blog posts. When someone clicks the TITLE of a POST, I want that post to open in a new tab or window. I understand how target=”_blank” works, but I can’t find where to add it. The source-code I’m looking to modify is this:


<div class="td_module_15 .....
<div class="item-details">
<h1 class="entry-title">

I just want to change it to:


<div class="td_module_15 .....
<div class="item-details">
<h1 class="entry-title">

I THOUGHT this should be in Loop.php, but I can’t find it anywhere.

  • This topic was modified 5 years by SJB.
  • This topic was modified 5 years by SJB.
  • This topic was modified 5 years by SJB.
Post count: 16

.

  • This reply was modified 5 years by SJB.
Post count: 16

Sorry I can’t figure this out from reading previous people who have clearly asked the same thing…

My main page has the most recent 40 blog posts. When someone clicks the TITLE of a POST, I want that post to open in a new tab or window. I understand how target=”_blank” works, but I can’t find where to add it. The source-code I’m looking to modify is this:


<div class="td_module_15 .....
<div class="item-details">
<h1 class="entry-title"><xa href="~~~">

I just want to change it to:


<div class="td_module_15 .....
<div class="item-details">
<h1 class="entry-title"><xa target="_blank" href="~~~">

I THOUGHT this should be in Loop.php, but I can’t find it anywhere.

  • This reply was modified 5 years by SJB.
  • This reply was modified 5 years by SJB.
Post count: 16

Seriously, If I can’t paste in “a href” without the site turning it into an ACTUAL “a href”, how the hell are you supposed to ask a question about links?

Post count: 35449

Hi SJB,
Sorry for the late answer, for the moment we do not work in weekend -> https://i.imgur.com/HBnJLAL.png

So if I understand correctly the block that you want to change is using the the td_module_15 this must be a block that is using the module 15 this can be find in theme files -> wp-content/themes/Newspaper/loop.php and theme plugins -> https://i.imgur.com/5LU8Zja.png -> wp-content/plugins/td-composer/legacy/Newspaper/loop.php
If this is not helping, please provide me a link to your website and let me know the titles that you want to be open in a new tab.

hope this will help you!
Thank you!

Post count: 16

No worries. I don’t mean to be an idiot, but what exactly is that a screen capture of? I have wordpress backend where I click on “Appearance” –> “Theme Editor”… From there I can edit the loop.php file, but it doesn’t seem to do anything.

Your screen capture indicates you’re editing the “loop.php” file in the “woocommerce” folder… Under “woocommerce”, I see “archive-product.php” and “single-product.php”. That’s all I see there.

Here’s a screen cap of MY loop.php, but the modification does nothing.

http://www.financialsurvivalnetwork.com/wp-content/uploads/2020/09/ScreenCap.png

(website URL same as image host.)

Sorry if this is just a case of me being a moron… Entirely possible, but if the loop.php I’m editing isn’t right one, why is it the one I see in the theme editor?

Still confused, but thanks,
-SJB

Post count: 35449

Hi SJB, you are editing the loop from the theme files and you need to edit the one from plugin files from wp-content/plugins/td-composer/legacy/Newspaper/loop.php -> https://i.imgur.com/TFBqVZo.png you can get there from here too:
-> https://i.imgur.com/bxcv2yk.png -> https://i.imgur.com/XuIUOdG.png
Hope this will help you better!
Let me know the results!

Post count: 16

Nope, it didn’t work.

For the record, I edited:
public_html/wp-content/plugins/td-composer/legacy/Newspaper/loop.php

For what it’s worth, when I look at the source code of my webpage, the title is wrapped in an “H1” tag… h1 class=”entry-title”

The code I’m editing is CLEARLY wrapped in an “H3” tag… h3 class=”entry-title td-module-title”

….So I’m not convinced I’m even editing the proper thing.

Anyway, here’s a screen capture of the loop.php that’s still not working right for me…

http://www.financialsurvivalnetwork.com/wp-content/uploads/2020/09/SreenCap2.png

Still confused, but will carry on….
~SJB.

Post count: 16
Post count: 35449

Hi,

If this is not working, I think is because you are not using a static homepage and you have set as homepage your latest posts, lets make one more try on this file path -> wp-content/plugins/td-composer/legacy/common/wp_booster/td_module_single_base.php on line 61 -> https://i.imgur.com/Gxg9Z85.png -> https://i.imgur.com/40r7i1t.png

Let me know the results!

Post count: 16

Success! THANK YOU. That’s perfect.

>> I think is because you are not using a static
>> homepage and you have set as homepage your
>> latest posts

Yes. In fairness, that was my opening line in the question: “My main page has the most recent 40 blog posts.”

This explains why I couldn’t figure it out from the previous people who’d asked the same question, so hopefully this thread will help someone else figure it out one day.

~SJB

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