Income Tax Calculator

August 16, 2017 income tax income tax calculator javascript javascript frameworks tax Wordpress 0

I am pleased to present a state of the art income tax/salary calculator that I have built for UK citizens to calculate their tax and salary, with the help of AngularJs and WordPress. The salary calculator was built because of the lack of a really easy to use yet feature-full income tax calculator in the… Read more

How To Add Categories To WordPress Pages

August 13, 2017 php Wordpress 0

As a default, WordPress won’t allow you to categorise the pages, as it only allows categories to be set to posts. The good news is that there is a very easy way to enable categories to WordPress pages. Just paste the code below into your plugin’s or theme’s functions.php file, and you’re done: 12345function add_taxonomies_to_pages()… Read more

Save and retrieve data with WordPress Options

August 11, 2017 php Wordpress 0

Sometimes you might be in need of quickly storing and retrieveing data in WordPress for your plugin (in this example a simple delivery price is stored in wp_options table), and you don’t want to set up a separate database table and code to handle the database for this. The good news is that there is… Read more

WordPress Insert Content After Content

August 11, 2017 php Wordpress 0

This is a simple code to add extra content after the content of a page or post in a WordPress website. Just paste the code intop your plugin’s or theme’s functions.php file, and edit it to your preference: 12345678910function wpb_after_post_content( $content ) {                     $custom_content =… Read more

Regex to extract url that contains word

June 13, 2017 Design 0

The regex below will help you find and extract the url of a link from within an html code. In the case below, it will find the href attribute that contains the word linkedin.com, and will return the full url. 1<a [^>]*\bhref\s*=\s*"([^"]*linkedin.com[^"]*)

MySQL Get Distance By Latitude And Longitude Coordinates

April 16, 2017 mysql 0

Create a stored procedure: 12345678910111213CREATE FUNCTION distance (latA double, lonA double, latB double, LonB double)     RETURNS double DETERMINISTIC BEGIN     SET @RlatA = radians(latA);     SET @RlonA = radians(lonA);     SET @RlatB = radians(latB);     SET @RlonB = radians(LonB);     SET @deltaLat = @RlatA – @RlatB;    … Read more

What SEO Technique Works in 2017

February 24, 2017 SEO 0

Search engine optimisation is the technique that helps website owners rank their websites higher on search engines (we’ll be talking about Google here) for their most relevant and business generating search terms. For example, if you own a web design company in Oxford, and you would like to rank your website on the first page… Read more

Two Way Data Binding With jQuery

February 23, 2017 Design development javascript jquery 0

This is definitely the most simple and one of the most effective 2 way data binding method with jQuery. Just simply add the custom attribute bind to any element, and it will bind the data to all elements with the same bind value. See the code below get the idea: One: This div’s content will… Read more

Get the name of the current branch in Git

February 22, 2017 Git 0

Sometimes you might be tired and you might have forgotten which is your current branch in git, and therefore you need some kind of a guide that will show you your current branch. So here is the command that will do this for you: This command will get your current branch displayed in git: git branch… Read more

Useful SSH Linux Commands

January 19, 2017 Design 0

Without over complicating things, here is a list of useful SSH commands that I’m using to remotely manipulate the server of my websites. du -msh  /home/directory_name/public_html/  – This will show you the size of the selected directory (this can take quite a while if you have many files in the directory, even hours! be patient) ls… Read more