Category: Code Snippets
-

Clean Up WordPress Dashboard Widgets
[ad_1] WordPress admin dashboard comes with many widgets out of the box. But unnecessary WordPress dashboard widgets can be confusing for new users or clients inexperienced in using WordPress. It could be a little overwhelming for them at first time they log in. Clean up WordPress dashboard can also help you simplify WordPress for users…
-

Enable Automatic Updates For Major WordPress Releases
[ad_1] WordPress recently introduced automatic WordPress updates in version 3.7. WordPress can now automatically update itself without any user input, when there is a new minor or security release available. Earlier we showed you how to disable automatic updates in WordPress for manual updating. But if you really like the idea of auto-updating WordPress, then…
-

Disable Comments in Old Blog Posts via PHP
[ad_1] Whilst comment spam does occur on new articles, it is more common for comments spammers to target older blog posts that have established traffic and a good search engine ranking. These articles can sometimes be years old, so you may not even notice that they have been attacked. Disable comments on such old posts…
-

Display Related Posts Without Plugin
[ad_1] When visitors finish reading one of your posts, it is important to provide a clear “what next?” option. In the absence of cues to keep interacting with your site, visitors are more likely to leave your website. Displaying a list of related posts just below individual posts is a great way to keep readers…
-

Set HTML Editor as Default Post Editor in WordPress
[ad_1] When using the WordPress post editor you can choose if you want to write your posts in either the visual text editor or the HTML text editor. By default, Visual Editor is the default post editor in WordPress. If you are comfortable with writing posts in visual editor and want to keep it as…
-

Exclude Category Posts From WordPress Blog
[ad_1] Sometimes it isn’t always appropriate to have articles from every category to show up on your blog’s homepage. For one reason or another, you may not want posts from one or more categories appearing in the stream of posts. For example, if you are posting frequent updates to your products and showing them in…
-

Ignore More Tag in Post Content
[ad_1] In WordPress, there is a special HTML comment tag called more. <!–more–> This tag allows you to put a stopping point in the content of the post, this is then searched by WordPress when you display a list of posts. If WordPress finds this more comment in your content then it will only display…
-

Get Template File Being Used on Current Page
[ad_1] Have you ever wanted to get template file being used on a current page? Well, I did, on a project I was working for a client. I wanted to get page template name to filter the post query based on the page template file being used. Although I could have done this by creating…
-

Exclude Pages From WordPress Search Results
[ad_1] By default, WordPress displays all of your blog’s pages in search results along with blog posts. But on a specific project you may want to exclude pages from WordPress search results to make your search more relevant and less crowded. After all, most of the time, your readers want to find interesting posts, not…
-

Load jQuery From Google CDN in WordPress
[ad_1] jQuery is undoubtedly one of the most commonly used JavaScript framework these days. Some of the biggest websites out there use jQuery and there’s no question about why, it’s both easy to use and incredibly powerful. As a matter of fact, WordPress uses jQuery by default out of the box. In this article, we…