Category Archives: Cats who code

Top 5 free WordPress plugins to monetize your blog

SEO Smart Links


When it comes to generating some money on a website without bloating it with countless ads, a very interesting solution to look at is definitely SEO Smart Links.

This plugin allows you to enter keywords or keyphrases, and link them to a hyperlink. So let’s say that you often blog about WordPress plugins. Just use the plugin to link the term “WordPress plugins” to your favorite WP Plugin vendor affiliate program, for example ThemeForest or WPZoom. An easy way to make a few bucks while keeping your content relevant and without a ton of ads.
Download

read more

Top 5 free WordPress plugins to monetize your blog

SEO Smart Links


When it comes to generating some money on a website without bloating it with countless ads, a very interesting solution to look at is definitely SEO Smart Links.

This plugin allows you to enter keywords or keyphrases, and link them to a hyperlink. So let’s say that you often blog about WordPress plugins. Just use the plugin to link the term “WordPress plugins” to your favorite WP Plugin vendor affiliate program, for example ThemeForest or WPZoom. An easy way to make a few bucks while keeping your content relevant and without a ton of ads.
Download

read more

10 WordPress themes for freelance web developers

Corporate




Corporate is a very nice looking theme with a lot of CSS3 eye-candy. It features all the sections a freelance web developer or designer can dream of, such as portfolio, testimonials, team, blog, and more.
Info/Demo/Download

Nimble




Nimble is a very elegant WordPress theme with a lot of page templates (contact form, image gallery, portfolio, login page, advanced search) and useful features for individual or small businesses looking for a simple and flexible way to showcase their work.
Info/Demo/Download

read more

Super useful PHP Snippets

Create Data URI’s

Data URI’s can be useful for embedding images into HTML/CSS/JS to save on HTTP requests and consequently enhance your site loading time. The following function will create a Data URI based on $file for easier embedding.

function data_uri($file, $mime) {
  $contents=file_get_contents($file);
  $base64=base64_encode($contents);
  echo "data:$mime;base64,$base64";
}

Source: CSS Tricks

Further reading: Google PageSpeed Insights: How I fixed my slow website

Combine JavaScript and CSS files

Another good tip to minimize http requests and save on page loading time: Combine your CSS and JS files. While I would recommend using a dedicated plugin to do so (such as minify), it’s still very easy to combine files using php. Let’s have a look:

function combine_my_files($array_files, $destination_dir, $dest_file_name){

    if(!is_file($destination_dir . $dest_file_name)){ //continue only if file doesn't exist
        $content = "";
        foreach ($array_files as $file){ //loop through array list
            $content .= file_get_contents($file); //read each file
        }

        //You can use some sort of minifier here
        //minify_my_js($content);

        $new_file = fopen($destination_dir . $dest_file_name, "w" ); //open file for writing
        fwrite($new_file , $content); //write to destination
        fclose($new_file);
        return '<script src="'. $destination_dir . $dest_file_name.'"></script>'; //output combined file
    }else{
        //use stored file
        return '<script src="'. $destination_dir . $dest_file_name.'"></script>'; //output combine file
    }
}

read more