So there are lots of snippets of code out there for excluding categories or tags from searches. But what if you just want to exclude a specific post or two, and don’t want to create a whole other category or tag to use for that?Continue reading “Hack: Exclude a Specific Post From Searches”
So you want to create a utility page that accesses things on your site, but without all of the overhead of your theme, headers, etc. You can create any PHP script and simply include all of the WordPress functions to access as you wish.Continue reading “Hack: Using WordPress Functions Without WordPress”
When you view the source of your WordPress pages, you may notice that the version of WordPress you are using appears in the header. Some believe this can be a security risk, as exploits that work on specific versions of WordPress could determine you site’s version and use that to figure out how to attack it. I haven’t seen any real threat, though. But you may want to remove it anyway.Continue reading “Hack: Remove the WordPress Version Number From Your Site”
When someone links to your site with the wrong URL, or, worse, you link to your own site with the wrong URL, it would be nice to know. You could check your server’s logs for 404 errors to see what bad URLs people are using. But I find it easier to create a simple 404 log file that I can access without much hassle. Then I check it every once in a while to see if I need to add a redirect to the correct page so I don’t miss some traffic.Continue reading “Hack: Create a Simple 404 Log”
Categories and tags are useful for a number of purposes. Sometimes you want to have a category or tag that is for backend purposes, and not necessarily for display. Sometimes you want writers on your site to only see certain terms. You can filter these easily with the list_terms_exclusions hook.Continue reading “Hack: Exclude Categories or Tags From Lists”
When you publish a new post you will get hit with a short checklist of things before the post goes live. This is usually very useful and doesn’t take up much time. But if you publish often and don’t mind fixing problems after you publish, then you can turn off this feature.Continue reading “Tip: Using And Turning Off Pre-Publish Checks”
You don’t need some giant third-party plugin to implement SEO techniqueson your WordPress site. You can write your owncustomizable functions to include with your child theme or custom plugin.
But taking advantage of some basic WordPress actionsand filters, you can modify things like your titleand H1 tags, meta datatags and other header code. You can set some or all of your links to nofollowand add related linksto your posts automatically. You can also include sitemaps.
If you are a developer, then creating your own simple SEO plugin can be an improvement over including a massive third-party plugin that will overwhelm and confuse your clients. If you maintain your own site, a custom plugin can be more streamlined and give you greater control over how you implement SEO.
This course includes all of the code discussed in the lessons. You can take the code and use it on your site, customize it, and distribute it to clients if you wish.
I previous showed you how to place some text over an image when you added it to your Media library. But you may want more than plain text. Here is a way to use a transparent PNG file instead. This example show some text and a logo, with a white drop shadow to make the dark watermark stand out.Continue reading “Hack: Automatically Watermark Your Images With a Transparent Overlay”
Putting some text on every image you use on your blog can be a pain if you do it manually. It would be so great if WordPress just did this automatically. Here is one, pretty simple, way to do it. You can see the result in the image below.Continue reading “Hack: Automatically Watermark Every Image You Upload to WordPress”
By default a list of posts will appear with the most recent one on top and the rest in descending chronological order. But if you have a need to show the list in alphabetical order, then you can change that in the pre_get_posts hook. One example may be a glossary. Another may be like the one-page site I created the other week.Continue reading “Hack: Show Post List In Alphabetical Order”