Thanks for visiting. Please take a look at my portfolio to get an idea of that kind of projects I’ve worked on in the past. Most of the Facebook applications I’ve developed are still available on Facebook today. If you want to find out more about me or simply want to leave a comment you can contact me here.
If you want to filter certain posts by tags in your WordPress theme, here is a simple way to do so before executing the WordPress loop. This method lets you exclude posts that contain certain tags, or you can easily change the code to include post with certain tags instead.
Solution
// Modify the query $query_string['tag__not_in'] = array(1,4,5); query_posts( $query_string ); // WordPress Loop if (have_posts()) : while (have_posts()) : the_post(); update_post_caches($posts); // Display posts here endwhile; else : // No posts found endif;
Modification
If you want to include certain tag IDs, you only need to change one line of the code.
Change:
$query_string['tag__not_in'] = array(1,4,5);
To:
$query_string['tag__in'] = array(1,4,5);
I recently ran into a problem where I wanted to display only posts tagged with a specific name in the WordPress Archive page (part of my theme). However, searching on Google only showed how to filter posts by Category. I did some research and found a solution to my problem.
Read more
It’s been just over a week since I got my first Android 4.0 phone – the Samsung / Google Galaxy Nexus (SGN) – and I’m loving it! The SGN was my replacement for the Google Nexus One (GNO), which I’ve had since it was first released back in 2009. The improvement in the OS have been huge – my GNO was running Android 2.3.6 and some of the new features and changes in the UI have been a big plus on the SGN.
I came into a recent issue where I wanted to hide ?id=xx from the query string of a URL so I could use a single Facebook Comment Plugin with different data. I fixed the issue by using a few lines of code in a .htaccess file.
RewriteBase /
RewriteRule ^file-([0-9]+)\.php$ /some_directory/files.php?id=$1 [L]
The code above simply points URLs like file-1.php to a single PHP file, but modifies the query string to make files.php?id=1. This means I can hide the query string and make the Facebook Comment Plugin think each page is unique. Since Facebook doesn’t allow query strings in the plugin, this is a elegant solution to make it work.
If you have various password protected pages on your website, but want people to Like your pages (via Facebook), there is a simple trick you can use to allow this. You can detect the Facebook Scraper by its User Agent and serve up an alternative page that contains the OpenGraph markup you would like to use.
A while ago I had to sync files from one server to another. The reason? I was responsible for moving all the application and websites hosted on a old server to a new, faster server with better security and a updated operating system. Since the servers were remote, I couldn’t simply use a USB drive and transfer the files from one server to another.
I recently ran into a problem with disc space on my Mac, requiring me to find and delete large files to free up some space quickly. I found the following command (in Terminal) very useful to find large files of a given size in a given directory.
When it comes to updating a database or your code in a production environment, or even migrating code between old and new servers, you don’t want someone accessing your files during your deployment procedure. Why? In the case of database updates, access to your database during an update could cause data inconsistencies, corruption or worse.
During any server maintenance, I’ve found that using a .htaccess file to display a ‘maintenance’ message extremely useful. Anyone accessing any web page on my server (or sub-directory) would see the maintenance message.
Managing a server using SSH and Command Line Access over the past few years has taught me a lot. It’s sometimes important to check how a server is doing in terms of load or you may simply want to check hard disk usage. Here are some commands I’ve frequently used:
I’ve come to love my Nexus One and the Android OS, even after using the iPhone for over three years. Having moved completely over from the iPhone to Nexus One, I’ve come to love many application on the Android OS, and I would like to share some of them with you.