Category: Code Snippets
-

Check if Certain Plugin is Active in WordPress
[ad_1] While developing a theme or a plugin, we sometimes need to check if a particular third-party plugin is active and only perform certain actions if it is. This might be due to my customization adding some extra functionality on top of the other plugin. Therefore it doesn’t make sense to have my customization active…
-

Change Pages Link to Display Published Pages Only
[ad_1] In previous articles we have seen ways to remove submenu items and add link to all options in WordPress admin, In this article we will see how to change pages link in WordPress menu to display published pages. By default, Pages link in WordPress admin dashboard shows a list of all pages, no matter…
-

Completely Disable Sidebars in WordPress
[ad_1] Sidebar is a theme feature introduced with WordPress Version 2.2. It’s basically a vertical column provided by a theme for displaying information other than the main content of the web page. Themes usually provide at least one sidebar at the left or right of the content. These sidebars usually contain widgets that an administrator…
-

Add Jetpack Sharing Buttons Above Post Content
[ad_1] If you are self hosting WordPress on your server then you are missing out tons of features available specifically to wordpress.com users. To narrow this gap down, WordPress team has developed Jetpack plugin for self hosted blogs so they can also take benefits of these features without hosting their website on wordpress.com’s restrictive environment.…
-

Remove Menu Items From WordPress Admin Bar
[ad_1] In version 3.1, WordPress added a fixed menu bar at the top of the website, it’s called WordPress Admin Bar. Ever since the introduction of the WordPress admin bar, it has been a topic of discussion among developers. Some developers hate it because in some cases it breaks the website design and for that…
-

Change Reply Link Text on Threaded Comments
[ad_1] There are many comment services available for WordPress like Disqus, Intense Debate, Facebook Comments, Google+ Comments and many more. But most of the WordPress themes still utilize the standard WordPress comments system. Because it’s very easy to use, nothing to set up and works flawless out of the box. WordPress introduced a simple tag…
-

Use Custom Permalink Structure for Pages in WordPress
[ad_1] Permalinks are the permanent URLs to your individual blog posts, pages as well as categories, tags and other lists of blog postings. By default, WordPress uses post ID query string as permalink structure rule but it’s not very user-friendly, and it is also not Search Engine Friendly. It is better to refer a visitor…
-

Add First and Last Class to Navigation Menu Items
[ad_1] In version 3.0 WordPress presented us with the new Menus functionality, it completely changed the way we use navigation menus in WordPress. Now we can easily manage our navigation menus and include pages, custom links and categories without hacking page listing functions or creating our own custom function. We can simply drag and drop…
-

Display Circular Shape Avatars in WordPress
[ad_1] Many of you may have noticed a new trend of circular shape avatars (profile images) in author bio as well as in comments section. You may also be wondering how it’s done or do I need to edit them in Photoshop to make it circular. Editing your avatar in image editing software will only…
-

Get The Previous And Next Post Link URLs
[ad_1] WordPress provides several navigational template tags to make it easy for developer to create previous and next post link navigation for browsing through WordPress blog. There are basically two different types of template tags used for chronological post navigation, posts_nav_link() and previous_post_link() & next_post_link(). But there is a small problem with these template tags,…