Multilingual Satisfy

The WordPress theme Satisfy can be translated into many different languages. It also supports multilingual plugins like Polylang and Wpml. But some dynamic texts doesn't get picked up automatically by those plugins. To fix that follow the steps below: (if you have premium there's no need for this fix). Create a file called "wpml-config.xml" and..

Simple Wp Sitemap on Nginx

To get Simple Wp Sitemap working on Nginx, add the following rewrite rules for free or premium to the server { } section in your server file nginx.conf. # Simple Wp Sitemaplocation ~ /sitemap\.(xml|html) {rewrite ^/sitemap\.(xml|html)$ /index.php?thesimplewpsitemap=$1 last;} # Simple Wp Sitemap Premiumlocation ~ /sitemap(.*)\.(xml|html) {rewrite ^/sitemap\.(xml|html)$ /index.php?swsitemap=$1 last;rewrite ^/sitemap-home\.xml$ /index.php?swsitemap=xml&swsitemaptype=homepage last;rewrite ^/sitemap-(.*)\.xml$ /index.php?swsitemap=xml&swsitemaptype=$1 last;}

How to better check data types in javascript

How to better check data types in javascript banner image

To check what data type something has in javascript is not always the easiest. The language itself provides an operator called typeof for that which works in a straightforward way. Typeof returns a string of what a values data type is, so for an object "object" is returned and for a string "string". However javascripts..

Ajax in javascript

What is ajax in javascript? That's a question most web developers have asked themselves at least once in their careers. Firstly it should be pointed out that ajax doesn't have anything to do with famous cleaning product. It's a technique for doing asynchronous http requests to a web server. Asynchronous programming Asynchronous programming basically means..

RequestAnimationFrame for better animations in javascript

RequestAnimationFrame is a function in javascript which is used to create animations directly in the browser. Javascript has been used for doing animations for a long time, and it's pretty awesome what things really can be done with the language. For simpler stuff though as animated hover effects when someone hovers their mouse cursor over..

A simple html5 template

This is a simple template in html5 that can be used as a base for all types of web projects. It only contains the most necessary elements (and just a little more) for a valid html page. Perfect for the lazy person who doesn't feel like typing this all over and over again when starting new..

Loops in javascript

Loops in javascript are something very useful and which are used all the time. They're not specific just for javascript, rather they can be found in almost all programming languages in the world. Loops are one of the most fundamental building blocks in programming, and some argument that all you really need to create a..

Strings in javascript and their properties and methods

Strings in javascript This chapter is about strings in javascript. What a string is, is a sequence of characters like letters, numbers, symbols and spaces for instance to represent some kind of text. It's a data type that's used all the time for all sorts of things, and isn't unique for just javascript in any..

Numbers and operators in javascript

Numbers In many programming languages working with numbers can be quite complicated. There are actually many different data types that needs to be remembered and set for each of the programs numbers. For instance integers must be declared with int, floating numbers with float. And then there's smallint, tinyint, double etc. A variable holding an..

How statements and comments in javascript looks and work

Statements In javascript statements are simply the lines of code that's been written into a script and that gets executed by the web browser. It works the same way like in most other programming languages, meaning statements are just different lines of commands and instructions for things you want the computer to do. For example..

Webbjocke is up and running

Webbjocke is up and running banner image

Hello there! Now the blog Webbjocke is up and running. Here there will be written posts about all kind of things that has to do with the web and internet. Firstly it will be about web programming like html, css and javascript. Then we'll see what happens. It will be about information, news, development, and..