How to Add Adsense to WordPress Posts

Putting Adsense ads on your site is the simplest way to monetize your blog. Luckily for us, Google has made it pretty easy. Here's a quick tutorial with screenshots on how to add Adsense to WordPress. Step 1: Log in to your Adsense Account If you don't have an Adsense account, create one … [Read more...]

How to Remove Posts from the Homepage in WordPress

By default, new WordPress posts appear at the front of your blog. However, sometimes you don't want this to happen! Here's how to remove posts from the home page, so they don't appear in your feed. Step 1: Create a New "Dummy" Category The best way to keep some posts away from the front of … [Read more...]

WordPress – How to Prevent Duplicate Post Titles

If you have a lot of people contributing content to your blog, you might accidentally have two posts with the same title. By default, WordPress doesn't raise any red flags when that happens. It'll generate a unique URL by appending a number (1, 2, etc.) after the original URL and so prevent any … [Read more...]

How to Put an Image Before the Post Title in WordPress

Sometimes you might want to place an icon or an image before the post title. This might be a different image for each post, depending on your requirements. Here's a simple step by step guide with screenshots on how to accomplish this. Step 1: Upload your Image to WordPress The first step is to … [Read more...]

How to Link to a Draft in WordPress with Pretty Permalinks

Update: Unfortunately, the below code doesn't work with the WordPress Gutenberg editor. If you need this badly, consider temporarily switching to the WordPress classic editor and then switching back. The "Insert/Edit" link button in WordPress is a great tool for quickly referencing your own … [Read more...]

Change the Header Image Per Page in WordPress

Many WordPress themes allow you to set a header image to display on top of the page. This is done via the GUI in the theme customization options like this: Set Header Image But , this applies to ALL pages of the site. By default, there's no way to choose which image displays on a "per page" … [Read more...]

How to Remove Links in Posts with WordPress

Update: This functionality no longer exists with the latest versions of WordPress and Gutenberg. This is because Gutenberg no longer uses the "post_updated_messages" filter. If you want this code to work, I suggest you install the WordPress Classic Editor plugin. Imagine you have an article … [Read more...]

How to Manually Switch a WordPress Theme via FTP

If you're staring at a broken WordPress theme and can't even access your administration dashboard, don't panic! This step by step tutorial will show you how to switch to another theme manually using FTP. Related to Fixing WordPress: [FIX] Unable to Communicate Back with Site" in … [Read more...]

How to Display Custom Error Messages in WordPress Admin

There are many ways to display custom error messages in WordPress. You must have often seen WordPress display error messages in the admin area. Nags to update to the latest release, for example. Various plugins also inject their custom messages highlighting new features or asking you to take … [Read more...]

How to Remove “Comments are Closed” From WordPress Pages

When you create a static landing page in WordPress, you'll probably want to remove "comments are closed" from showing up underneath your content. Since version 4.3, comments have been disabled by default for pages. But why, then, do we continue to have that ugly message underneath our page … [Read more...]

WP-Tweaks