The "No Dev Question is Stupid" Thread - Basic HTML / CSS / Etc.

Joined
Sep 3, 2020
Messages
34
Likes
24
Degree
0
Look at your html in the browser (View Source). If the extra nofollow is not there it is likely a validator problem. If it is, then something in your site and hosting process is creating that - in other words, 'you' are the problem.
Yep, that's actually how I found it.

It looks like a plugin conflict. RankMath with something else.
 

BCN

$$$$ ¯\_(ツ)_/¯ $$$$
Joined
Dec 26, 2015
Messages
261
Likes
265
Degree
1
Probably it's done via the the_content hook. Just use one of the many plugins that show the hooks in use, and where it originates from. I bet you'll see a plugin hooking into that, and parsing/filtering all links and adding the attribute.
 
Joined
Apr 23, 2019
Messages
181
Likes
132
Degree
1
In the crashcourse it is mentioned that "if you can do it in css, you should do it".
It was to increase the speed of your website.

Does this still hold up if you need quite a bit of HTML as well? I would assume yes, because HTML is only some text so I would assume that you need a LOT of it before it becomes worse performance-wise, but I figured it would be better to ask, because once I begin converting my images to HTML I'm pretty sure I won't be willing to go back xD

My images are only 400x400 images in jpg.
But I could replace them using unicode (UTF-8) and css + html.

I think I found my answer:
https://www.smashingmagazine.com/2011/04/css3-vs-css-a-speed-benchmark/
(TL;DR yes, go with css + HTML)
The article talks about images as well.

Still interested in hearing opinions.
 
Joined
Mar 28, 2019
Messages
98
Likes
90
Degree
0
I've noticed some of the manual affiliate links in my content don't have the nofollow tag. Finding and changing them all manually would be quite a bit of work. Now I found a script that will automatically add a nofollow tag to URLs with specific terms (here, scroll down a bit) with Regex.

Is this a good solution? Somehow scanning all content with a regex script seems like it might be resource intensive?
 
Joined
May 16, 2020
Messages
27
Likes
18
Degree
0
I've noticed some of the manual affiliate links in my content don't have the nofollow tag. Finding and changing them all manually would be quite a bit of work. Now I found a script that will automatically add a nofollow tag to URLs with specific terms (here, scroll down a bit) with Regex.

Is this a good solution? Somehow scanning all content with a regex script seems like it might be resource intensive?
If you're using WordPress, the plugin BetterFindReplace works very well for me if you don't want to get into SQL queries.
 

Ryuzaki

お前はもう死んでいる
Moderator
BuSo Pro
Digital Strategist
Joined
Sep 3, 2014
Messages
5,068
Likes
9,730
Degree
9
I've noticed some of the manual affiliate links in my content don't have the nofollow tag. Finding and changing them all manually would be quite a bit of work. Now I found a script that will automatically add a nofollow tag to URLs with specific terms (here, scroll down a bit) with Regex.

Is this a good solution? Somehow scanning all content with a regex script seems like it might be resource intensive?
Finding these links isn't the problem. There's tons of free spiders you can use that can crawl your site and spit you out an organized list, including the rel tag. But changing them manually would be a pain.

The link you posted filters the_content(); which causes a lot of overhead on every page load (unless you're using server side caching, as you should be doing), but then it adds overhead during caching but not enough to matter.

The way I'd recommend doing it, since you're probably already loading Javascript anyways is to create a function that waits for the page to be loaded then identifies any external link within the main content container div that does not already have a nofollow tag, then let it get added on the browser side. Google does render Javascript so that should work. I do this to remove the "noreferrer" tag for affiliate link tracking, but that has nothing to do with Google.

In my case, I'd honestly crawl the site with Xenu, Screaming Frog, Integrity, etc., and then manually change them. I want those changes in the database, not happening browser side. I'm the type of dummy that'll gather up the list and be like "if I do 10 of these per night, I can be done in 45 days", etc.

Of course you could do it with SQL or BetterFindReplace like @cactus recommends, but you need to be very careful with SQL queries (take a backup first), and also you'll still need to spider the site to make sure you didn't miss any.
 
Joined
Mar 28, 2019
Messages
98
Likes
90
Degree
0
Finding these links isn't the problem. There's tons of free spiders you can use that can crawl your site and spit you out an organized list, including the rel tag. But changing them manually would be a pain.

The link you posted filters the_content(); which causes a lot of overhead on every page load (unless you're using server side caching, as you should be doing), but then it adds overhead during caching but not enough to matter.

The way I'd recommend doing it, since you're probably already loading Javascript anyways is to create a function that waits for the page to be loaded then identifies any external link within the main content container div that does not already have a nofollow tag, then let it get added on the browser side. Google does render Javascript so that should work. I do this to remove the "noreferrer" tag for affiliate link tracking, but that has nothing to do with Google.

In my case, I'd honestly crawl the site with Xenu, Screaming Frog, Integrity, etc., and then manually change them. I want those changes in the database, not happening browser side. I'm the type of dummy that'll gather up the list and be like "if I do 10 of these per night, I can be done in 45 days", etc.

Of course you could do it with SQL or BetterFindReplace like @cactus recommends, but you need to be very careful with SQL queries (take a backup first), and also you'll still need to spider the site to make sure you didn't miss any.
Thanks Ryu, I actually ended up using your strategy except for not using the crawler. Will try them to see if I missed any links.

About the the_content filter, that's indeed what I was wondering, since the script is running every time a page is generated. Was also a bit hesitant to use @cactus BetterFindReplace method, for the same reason you mentioned. So I ended up just doing it manually. A few hours spent was (probably) less painful than the headache of accidentally screwing up the database or getting slower page speed.
 

bernard

BuSo Pro
Joined
Dec 31, 2016
Messages
1,645
Likes
1,301
Degree
4
If a footer is shown when logged in to Wordpress, but disappears on some pages when logged out, what is the most likely cause? How do I begin troubleshooting?
 

Ryuzaki

お前はもう死んでいる
Moderator
BuSo Pro
Digital Strategist
Joined
Sep 3, 2014
Messages
5,068
Likes
9,730
Degree
9
If a footer is shown when logged in to Wordpress, but disappears on some pages when logged out, what is the most likely cause? How do I begin troubleshooting?

I'm thinking either the cache in malformed and when logged in you aren't viewing a cached version, or the footer is wrapped in some kind of PHP that says "if logged in, or if administrator" etc. It's most likely an issue with the cache, which could mean there's some other issue in the PHP code for the footer.

I'd see if you can identify some kind of relationship between the posts that aren't showing the footer, like if they're all in the same category or are category or tag pages, all pages and not posts, etc. If there's an error it's probably tucked into one template somewhere, if there's an identifiable pattern.
 

bernard

BuSo Pro
Joined
Dec 31, 2016
Messages
1,645
Likes
1,301
Degree
4
I'm thinking either the cache in malformed and when logged in you aren't viewing a cached version, or the footer is wrapped in some kind of PHP that says "if logged in, or if administrator" etc. It's most likely an issue with the cache, which could mean there's some other issue in the PHP code for the footer.

I'd see if you can identify some kind of relationship between the posts that aren't showing the footer, like if they're all in the same category or are category or tag pages, all pages and not posts, etc. If there's an error it's probably tucked into one template somewhere, if there's an identifiable pattern.

Weird stuff.

Suddenly my logo disappeared and then some other images on my front page.

And then they weren't in the FTP folders.

Then those images were showing when logged in and also there when I went to their url, but not in the FTP folder.

I guess some kind of weird cache thing yes
 

NSG

Joined
Dec 27, 2019
Messages
16
Likes
10
Degree
0
I'm trying to get rid of the "previous and next" single post navigation links in a WordPress theme. Most of the solutions I've found involve a variation of "display none" which I know is typically not good in the eyes of google. Same with removing the "proudly created with WordPress." How bad is it if I use CSS to fix the issue? What I feel like should be an easy fix in a child theme hasn't been and I really want to move on from this.
 

Ryuzaki

お前はもう死んでいる
Moderator
BuSo Pro
Digital Strategist
Joined
Sep 3, 2014
Messages
5,068
Likes
9,730
Degree
9
I'm trying to get rid of the "previous and next" single post navigation links in a WordPress theme. Most of the solutions I've found involve a variation of "display none" which I know is typically not good in the eyes of google. Same with removing the "proudly created with WordPress." How bad is it if I use CSS to fix the issue? What I feel like should be an easy fix in a child theme hasn't been and I really want to move on from this.

If you do "display: none;" (which is okay now that they pushed responsive mobile design, it's okay to hide stuff), then the links are still in the source code and Google will read them and crawl them, but users won't see them.

That's not really a sufficient solution in my opinion. It's a rubber band style solution.

Sounds like the Child Theme may not have copies of every template in it. In that case you can copy the single.php and footer.php if I had to guess and move those into the Child Theme where you can make edits.

It may not be as simple as some HTML code. It's more likely they've written functions for both of these scenarios and put them in the functions.php file. I'm not saying you need to edit the functions, but more that they're probably calling functions. You may see something like <?php footer_credits(); ?> which would be generating that "proudly created with WordPress" text link. Same goes for the previous and next links, which might be <?php prev_next(); ?> as an example.

You could remove those function calls from the templates from the Child Theme versions specifically and they'll override the parent versions.
 
  • Like
Reactions: NSG

NSG

Joined
Dec 27, 2019
Messages
16
Likes
10
Degree
0
If you do "display: none;" (which is okay now that they pushed responsive mobile design, it's okay to hide stuff), then the links are still in the source code and Google will read them and crawl them, but users won't see them.

That's not really a sufficient solution in my opinion. It's a rubber band style solution.

Sounds like the Child Theme may not have copies of every template in it. In that case you can copy the single.php and footer.php if I had to guess and move those into the Child Theme where you can make edits.

It may not be as simple as some HTML code. It's more likely they've written functions for both of these scenarios and put them in the functions.php file. I'm not saying you need to edit the functions, but more that they're probably calling functions. You may see something like <?php footer_credits(); ?> which would be generating that "proudly created with WordPress" text link. Same goes for the previous and next links, which might be <?php prev_next(); ?> as an example.

You could remove those function calls from the templates from the Child Theme versions specifically and they'll override the parent versions.
That was the answer, I needed to create a new single.php page in the child theme and then edit that file. I've been avoiding "display: none" for ages now, so glad to know it's an option as a last resort. Thanks for the help!
 
Joined
Oct 7, 2020
Messages
14
Likes
5
Degree
0
Was browsing the DevOps thread and saw this one

https://www.buildersociety.com/threads/hundreds-of-hand-coded-amz-links-fml.5687/

Which is exactly what I'm doing to my Amazon links currently. What's the best low/no-code solution for managing affiliate links these days or should I wait till I am larger as I'm under200 posts still. Feels like something I'd rather get right early than change hundreds down the line like @MrMedia had to in his acquisition