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.
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.
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!
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
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!
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.
Just to be 100% clear on what I need….
http://www.financialsurvivalnetwork.com/wp-content/uploads/2020/09/WhereIsThisCode.png
-S
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!
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