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

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.
 
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.
 
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.
 
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?
 
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.
 
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.
 
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.
 
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?
 
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.
 
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
 
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.
 
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
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!
 
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
 
Do I need to add if (!defined("ABSPATH")) exit; to every php file within a theme or plugin I make?

My intuition says yes since I don't want any php file accessed directly, but is that the correct approach?
 
I am not very good with coding, so I'd like some input on this.

A guy coded some nice looking boxes for me using CSS. There is a title within the box.

In the posts I add the h2-tag outside of the div. It looks like this:

<h2><p class="title">Title here</p></h2>

Is this an ok way to do it or should I make the title H2 in some other way?

Thanks.
 
I am not very good with coding, so I'd like some input on this.

A guy coded some nice looking boxes for me using CSS. There is a title within the box.

In the posts I add the h2-tag outside of the div. It looks like this:

<h2><p class="title">Title here</p></h2>

Is this an ok way to do it or should I make the title H2 in some other way?

Thanks.
Totally depends on the CSS code but I'd say you're doing it right. The only alternative would be <h2 class="title">Title here</h2> but the .title class may be coded specifically to adjust and override CSS associated with the paragraph tag. So it may not be generalizable over to the h2 tag.

Either way, what you're doing is totally acceptable and correct by HTML and CSS standards.
 
Semantically and technically, I would have thought a p is supposed to follow an h2 and not be contained within it, but if it is working...
 
In any case, I think mostly organic backlinks are almost always worth it, but if spending, I would argue that buying links is pretty difficult these days and that if anyone actually has a serious edge in that, they also have a huge edge in general.

Personally, I would prefer something like link insertions linking to a resource page that links to my money page.
This got me thinking...
But I imagine you see the Crash Course as a resource page right?
I ask because I have created a gigantic crash course for my niche in a post. Now I realize that such a guide would hardly ever change. So maybe it should have been a page and not a post?
Well, the course is like 50 articles, so I'm not sure how to handle it.
All tied together by an index.

I probably should have spent more time on resource pages. I created some at the start and then forgot about them... Fuck me.

Pages and Posts still kinda confuse me. Ryuzaki once told me that pages almost never get updated. Stuff like Author Bio, terms of service, contact, etc.
A guide like that would probably also almost never need to be updated (depending on the niche of course).
But it doesn't "feel" like it fits in the example list.
 
@WinMore, it literally doesn't matter. Google doesn't know the difference, the user doesn't know the difference. Wordpress has simply provided two types of "posts" for you to stay organized: Pages & Posts.

Pages give you the option of having sub-pages where the parent page's slug remains in the URL.

Posts give you the option of categorizing by categories and tags, where you can choose to have the category or tags in the permalink or not.

How you use those are up to you. If it's not enough you can even create "Custom Post Types" so you could have: Pages, Posts, Recipes, Videos, FAQ's, Events, whatever.

It's wide open and up to you.

But as far as using the standard Posts and Pages go, the convention (but not rule) is to put boilerplate content into Pages: Homepage, About, Contact, Terms of Service, Disclosures, FAQ's, Landing Pages for advertising, etc. And then the blog would go under Posts.

Think of a small business site. Most of the sections and pages of the site would fall under Pages, and then they'd have a blog where all that stuff goes into posts. It's just like that but for big sites too.

If you really care I'd assume there's a plugin or something to help you move content from Posts to Pages but be careful about maintaining your URLs (or you'll need to do 301's, and if the content is ranking and making money it's better not to mess with it).
 
Hi, any wp Woo geeks here?

I'm trying to figure out how to separate the options for a product that has many similar options. If you look at this page (not mine) https://vaporwheels.com/products/carbonx-wheel-set-12k-glossy-black-weave it has a separate section called 'additional options' with a black header and grey background.

Can anyone tell me how to do this please? It just looks better than having all the options together IMO.
 
Hi, any wp Woo geeks here?

I'm trying to figure out how to separate the options for a product that has many similar options. If you look at this page (not mine) https://vaporwheels.com/products/carbonx-wheel-set-12k-glossy-black-weave it has a separate section called 'additional options' with a black header and grey background.

Can anyone tell me how to do this please? It just looks better than having all the options together IMO.
The guys you linked to are using Shopify, but you probably could do that with ACF and some PHP I'm guessing. Or you could try using a plugin like this https://wordpress.org/plugins/woo-extra-product-options/ and then using PHP / CSS to try build something similar.
 
How would you go about tracking Elementor Forms the easiest?

I just got a refund from Monster Insights because the did the old switcheroo on the pricing to do that.
 
How would you go about tracking Elementor Forms the easiest?

I just got a refund from Monster Insights because the did the old switcheroo on the pricing to do that.
Since you mentioned Monster Insights, I'm guessing you're talking about tracking submissions in Google Analytics.

The easiest way to track them is probably to have the forms redirect to a "thank you" page after submitting. Then, you can set up a Goal to track all the visits to that page. Super simple, but not the most accurate. Since you're really just tracking visits to that page, your data could be skewed by users navigating to the "thank you" page directly, refreshing the page and getting tracked twice, etc.

A better way would be to fire off a Google Analytics Event every time a user successfully submits the form, and tie your Goal to that. It looks like Elementor has a custom JavaScript event just for that (https://github.com/elementor/elementor/issues/5305).

If you've set up your Analytics tracking through Google Tag Manager, you should even be able to configure the form submission event without writing any code.
 
Back