Most Useful Git commands

I have decided to stick with love. Hate is too great a burden to bear.

  1. List all the branches : git branch
  2. Pull the recent changes: git pull
  3. Create a feature branch : git checkout -b <new branch name> <parent branch name>
  4. Delete branch local: git branch -d <branch-name> or git branch -D <branch-name>
  5. Delete branch from remote : git push origin –delete <branch_name>
  6. See all remote branches: git branch -v -a
  7. Get conflicted list of files: git diff –name-only –diff-filter=U
  8. git fetch origin (checkout new remote branch)
    1. git checkout -t origin/remote-branch
  9. List all remote branches: git branch -r ()

Handy tips and Tools for working with wordpress -Part2?

“The best teachers are those who show you where to look, but don’t tell you what to see.”

1.How to add text-slider in wordpress pages ?
Solution:-
By using the “Text slider plugin

Activate the plugin > Add the Main and Sub text > Configure the settings > add the wp_text_slider();
?> in the code where you want to add this effect.

2.How to send contact email in wordpress ?
Solution:-
By using the “WCP contact” plugin

Activate the plugin > Add the Main and Sub text > Configure the settings > add the ;
?> in the shortcode like [wcp_contactform id=”wcpform_1″] where you want to add this form.

Note for sending the email to your email inbox you need to add the “SMTP plugin” else above plugin will show email messages inthe wordpress itself.

Not able to receive email using WCP contact plugin.

3.How to redirect page not found(404) to home page of website?
Solution:-
Incase you dont want to desing the 404 page, just follow the below code to redirect user to home page.

1.Open your 404.php page  (incase its not present use create one inside the themes folder )
2.Add the below lines of code, publish and you are done

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>

4.How to add carousel slider for the featured posts?
Solution:-
1.Using “carosuel slider“, add the plugin and select the option as post.

5.How to add Team member page in wordpress?
Solution:-
1.Using “Team member showcase plugin“, add the plugin and explore the free styles available.

More wordpress tips.

How to install IE browser on Mac-OS?

The best time to plant a tree was 20 years ago. The second best time is now.

Pre-requisite:- Virtual Environment to run the windows OS (with IE) on Mac OS.

Step1:- Installing the virtual environment using VirtualBox (free option, we can use VMware also)
a)Download Virtual Box
b)Install the setup 
Double click the .dmg file and follow the instructions
install virtual box in mac
Note:- On mac sometimes “Verifying VirtualBox.pkg step is stuck”, in that case follow the below steps to install the virtual box
Open terminal on mac and run the command,

 sudo installer -package /Volumes/VirtualBox/VirtualBox.pkg -target /

verifying virtualbox.pkg stuck on mac

Step2:- Download the windows environment
 a)Download windows + IE from modern.ie
b)Select the required environment options and download the .zip file
download virtual machine in modern.ie
c)Extract the downloaded file, it will create .ovf file

Step3:-Launch the IE in Virtual Box
a)Virtual box, File > Import appliance (open the .ovf file)

import ovf file in virtualbox

b)Select the default options > import

appliance settings in virtual box

c)Turn on the windows environment from virtual box

verifying virtualbox.pkg stuck on mac

All set, our windows environment is up and running on mac now we can work with IE browser 🙂
running windows on mac

Keep learning keep sharing.

Handy tips and Tools for working with wordpress -Part1?

Don’t judge each day by the harvest you reap but by the seeds that you plant.” Robert Louis Stevenson

1.How to add icons in wordpress pages ?
Solution:-
By using the “Better Font Awesome” plugin
Steps1:- Install and activate the plugin in wordpress.

Steps2:- Search the given icon from the font-awesome library, add the code in backend of the page where you want to use it.

Tips:-
1.Change the font-size by varying the font-size or directly adding a class like fa-3x, follow the example

2.Another way of adding is using the short code and directly adding from the fronted of the code.

add icons in wordpress

2.How to customize local CSS in page or post?
Solution:-
 Using the plugin WP add custom CSS plugin

3.How to create mobile menu in website?
Solution:-
 Using the plugin”WP mobile menu plugin

4.How to hide items from wordpress dashboard, thus avoid clients to mess up the code?
Solution:-
Appearnce > Editor > functions.php

open editor in wordpress

Place the below code in the functions.php file and save it

function remove_menus(){

remove_menu_page( ‘index.php’ ); //Dashboard
remove_menu_page( ‘edit.php’ ); //Posts
remove_menu_page( ‘upload.php’ ); //Media
remove_menu_page( ‘edit.php?post_type=page’ ); //Pages
remove_menu_page( ‘edit-comments.php’ ); //Comments
remove_menu_page( ‘themes.php’ ); //Appearance
remove_menu_page( ‘plugins.php’ ); //Plugins
remove_menu_page( ‘users.php’ ); //Users
remove_menu_page( ‘tools.php’ ); //Tools
remove_menu_page( ‘options-general.php’ ); //Settings

}
add_action( ‘admin_menu’, ‘remove_menus’ )

You can change it based on which tabs to hide or show.
Also can remove the external plugins which are added to the dashboard .

Complete reference can be taken from wordpress functions page.

5.How to customize columns displayed in post/comments/page?

Solution:-
Use Admin Columns plugin.

It provides an elegant solution for controlling the columns that show up on the All Posts, All Pages, Media Library, Users and Comments screens.

6.How to change the default wordpress login layout and design?ts/page?

Solution:-
Use Erident Custom Login and Dashboard plugin. Using this you can change the background images, remove wordpress, reset password links and redesign the login page as you want.