Category: Wordpress Snippets

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…

Display Most Commented Posts From 2013
[ad_1] A popular feature for the sidebar of your WordPress blog is to display most popular blog posts. Probably you have seen this on another blog and you might be wondering how it is done. There are many WordPress plugins that can do this but in this article we will show you how to display…

Protect Htaccess Files in WordPress Website
[ad_1] As you already know, the HTAccess file is a very powerful tool for manipulating site performance and functionality. It also allows you to control files and folders in the current directory, and all sub-directories. That is why it’s very critical for your website security to protect HTAccess files of your website from any unauthorized…

Automatically Spam Comments With a Long URL
[ad_1] Post comments are an important part of any blog, they give your visitors a way to engage with the author of the article. But with the benefit of comments on article there is also a lot of disadvantages especially with WordPress. Comment spam is the main and very common problem with WordPress and every…