Categories
Uncategorized

How to use Gist in Sublime Text 3

sublime-text-logo-text-editor-free-source-code

Sublime Text is the most popular text / source code editor widely used in programming. Although it is a proprietary software, there are lots of free and community build plugins which can be used to extend the feature of Sublime Text. If you are not already fallen in love with Sublime Text, they you must give try.

Gist is a simple way to share snippets and pastes with others. This is one awesome service provided by GitHub. It allows you to store code snippets for later use, you can have as many private gists as you need and you can group multiple gist files under a single gist.
If you frequently use Gist then there is a Sublime Text plugin which helps you to use it easy way. You can manually install this Sublime Text plugin from this Gist github repository.Or you can install it through Package Manager.

Generate Access Token

You will need Access Token for using Gist in Sublime text.

  • Open up GitHub site.
  • Go to Account Settings -> Applications
  • Click “Generate new token” under “Personal access tokens”
  • Enter some meaningful name in “Token description”
  • Under “Select scopes”, select gist

Setting up in Sublime Text

  • Open Sublime Text
  • Go to Preferences -> Package Settings -> Gist -> Settings – User

You will have to do some configuration before you can use it. In ‘token’, you will be to put access token you just generated. In ‘include_users’, put your github ID
Here is a sample settings.

Categories
Uncategorized

Quick Admin WordPress Plugin

UPDATE: THIS PLUGIN IS NO LONGER BEING MAINTAINED.

Quick Admin is a simple WordPress plugin for adding quick links in the admin dashboard and admin bar. Separate management panel is provided to add/edit/delete links. Adding links in Admin bar is optional. You can set roles for which quick links are displayed.

Quick Admin WordPress Plugin

Plugin Download : Plugin Download

Installation : Installation

Support : Get support from here

Reviews : Plugin reviews

Categories
Uncategorized

How to add extra menu item in WordPress Navigation menu

WordPress very easy interface for managing navigation for WordPress themes.  But in some cases you may want to add extra menu item in the WordPress navigation. Here is a simple example to show how to add extra menu item in WordPress navigation menu.

<?php
function custom_add_login_logout_link( $items, $args  ) {

    if( 'primary' == $args->theme_location ) {
            if ( is_user_logged_in() ) {

                $items .= '<li><a class="btn btn-logout" href="'.wp_logout_url(home_url()).'">Logout</a></li>';

            } else {

                $items .= '<li><a class="btn btn-login" href="'.wp_login_url() .'">Login</a></li>';

            }
        }
        return $items;

}
add_filter( 'wp_nav_menu_items', 'custom_add_login_logout_link', 10, 2 );

In this example we are targeting primary menu. If you have not registered menu then you have to register nav menu with register_nav_menus function.

<?php
register_nav_menus( array(
    'primary' => __( 'Primary Menu' ),  
 ) );

Categories
Uncategorized

NS Featured Posts WordPress Plugin

NS Featured Posts is a plugin for making posts, pages or custom post types featured. User can enable/disable Featured for selected post types.
This plugin add checkbox for each list item. You can easily check / uncheck the Featured. Checking the Featured will set the meta value yes for meta key _is_ns_featured_post. From plugin settings, you can choose to which post types you want Featured functionality.

Plugin Download : Plugin Download
Installation : Installation
Support : Get support from here
Reviews : Plugin reviews