WordPress rel=”nofollow ugc” attribute
If you run a site that lets people leave comments, post in a forum, or drop a guest article, you’ve inherited
A collection of web development tutorials and code snippets for WordPress, PHP, JavaScript, CSS and many more.
If you run a site that lets people leave comments, post in a forum, or drop a guest article, you’ve inherited
Log into WordPress and there it is in the top corner: “Howdy.” Friendly enough, but it doesn’t fit every site, and
Every time you save a post, WordPress quietly stashes a full copy as a revision. That’s the safety net that lets
You want an email signup form. You don’t want another plugin loading its own scripts and styles on every page just
Function Name: wp_body_open() Supported Version: WordPress 5.2+ If you’ve ever needed to drop a script or tracking pixel right after the
Every WordPress site needs a privacy policy page, and since 5.2 that page is easier to work with. You set it
You spin up a variable before you have anything to put in it yet. In PHP, that empty slot is NULL.
Someone lands on a dead URL, hits a bare 404, and bounces. It stings, so the tempting fix is to send
Most slow sites aren’t slow because of one heavy thing. They’re slow because the browser re-downloads the same logo, stylesheet, and
You ran a speed test, and it flagged “Leverage browser caching.” It sounds scary. It isn’t. On an Apache server it’s
Someone leaves a comment, drops a link in the website field, and now their name is a live link pointing off
You built a site. Someone in Berlin opens it, an analytics cookie fires before they’ve clicked a thing, and now you
You hit publish and you want Google to see the post today, not sometime next week. Back in the blog-heavy 2000s,
Some CDNs choke on query strings. WordPress adds a ?ver= tag to every script and style URL, and a few CDNs
Sometimes you need to run a bit of code the moment the page’s body opens: a tracking pixel, a skip-to-content link,
You dropped a shortcode into a widget title and it printed as plain text, brackets and all. That is WordPress doing
Quick heads up before you copy anything: this one is old. It dates to WordPress 4.9, which shipped back in 2017.
Internet Explorer used to drop a little clear button (the “X”) at the right edge of text inputs. Handy sometimes, annoying
Your site answers on two addresses: www.example.com and example.com. Pick one. If both stay live, Google sees two copies of every
Drop a plain string of digits on a page (an order number, a SKU, a tracking code) and some browsers helpfully