Top posts

Latest articles


Auto Draft

Posted by Jongerius under Uncategorized
1 Star2 Stars3 Stars4 Stars5 Stars6 Stars (No Ratings Yet)
Loading ... Loading ...


Working on Ajax integration with WordPress

Posted by Jongerius under Development, WordPress
1 Star2 Stars3 Stars4 Stars5 Stars6 Stars (No Ratings Yet)
Loading ... Loading ...

As part of the new theme I’ve been developing I’m including some richer user features. Like on the spot loading of comments and better mobile device support. One of the things I need to figure out during the development is how to use Ajax in WordPress, preferably native support. I know it should be possible, but have yet been unsuccessful to get it working.

So what I’ve been doing is setting up a new action using add_action for the following two action types:

  • wp_ajax_<myaction>
  • wp_ajax_nopriv_<myaction>

According to the documentation that should generate a hook to support both registered users (wp_ajax_<myaction>) and unregistered users (wp_ajax_nopriv_<myaction>). Which sounds great, since my theme should work for both type of users ;-) .

On the front-end I’ve created a Javascript method that should call the ajax command using the ‘wp-admin/admin-ajax.php’. With as action parameter the name of my ajax method. So in theory I should be setup correctly to handle ajax, but this is where the theory and actual situation start to differ.

To test my new theme I’ve been using the preview mode of WordPress, after all I don’t want to kill any existing feature or activate the theme before it is done. But for some reason my nicely setup Ajax hooks aren’t working as advertised.


Working on Ajax integration with WordPress

Posted by Jongerius under
1 Star2 Stars3 Stars4 Stars5 Stars6 Stars (No Ratings Yet)
Loading ... Loading ...

As part of the new theme I’ve been developing I’m including some richer user features. Like on the spot loading of comments and better mobile device support. One of the things I need to figure out during the development is how to use Ajax in WordPress, preferably native support. I know it should be possible, but have yet been unsuccessful to get it working.

So what I’ve been doing is setting up a new action using add_action for the following two action types:

  • wp_ajax_<myaction>
  • wp_ajax_nopriv_<myaction>

According to the documentation that should generate a hook to support both registered users (wp_ajax_<myaction>) and unregistered users (wp_ajax_nopriv_<myaction>). Which sounds great, since my theme should work for both type of users ;-) .

On the front-end I’ve created a Javascript method that should call the ajax command using the ‘wp-admin/admin-ajax.php’. With as action parameter the name of my ajax method. So in theory I should be setup correctly to handle ajax, but this is where the theory and actual situation start to differ.

To test my new theme I’ve been using the preview mode of WordPress, after all I don’t want to kill any existing feature or activate the theme before it is done. But for some reason my nicely setup Ajax hooks aren’t working as advertised.


Working on Ajax integration with WordPress

Posted by Jongerius under
1 Star2 Stars3 Stars4 Stars5 Stars6 Stars (No Ratings Yet)
Loading ... Loading ...

As part of the new theme I’ve been developing I’m including some richer user features. Like on the spot loading of comments and better mobile device support. One of the things I need to figure out during the development is how to use Ajax in WordPress, preferably native support. I know it should be possible, but have yet been unsuccesful to get it working.

So what I’ve been doing is setting up a new action using add_action for the following two action types:

  • wp_ajax_<myaction>
  • wp_ajax_nopriv_<myaction>

According to the documentation that should generate a hook to support both registered users (wp_ajax_<myaction>) and unregistered users (wp_ajax_nopriv_<myaction>). Which sounds great, since my theme should work for both type of users ;-) .

On the front-end I’ve created a Javascript method that should call the ajax command using the ‘wp-admin/admin-ajax.php’. With as action parameter the name of my ajax method. So in theory I should be setup correctly to handle ajax, but this is where the theory and actual situation start to differ.

To test my


Strike against SOPA

Posted by Jongerius under General Rant
1 Star2 Stars3 Stars4 Stars5 Stars6 Stars (No Ratings Yet)
Loading ... Loading ...

Just like many other website’s Narnio will go black on the 18th to protest against SOPA. For those that don’t now about it SOPA is Amerika’s way to oppress the free Internet as well as completely legal websites. Here are some of the reasons why SOPA sucks:

  1. SOPA Gives the Power to Censor the Internet to the Entertainment Industry
  2. SOPA Curbs Internet Freedom And Online Freedom of Speech
  3. SOPA Kills Jobs, Thwarts Entrepreneurial Growth
  4. SOPA Doesn’t Curb Piracy, It Merely Makes Pirated Content Less Accessible
  5. SOPA Is A Threat To Open Source Too

A lot of big Internet sites are opposing SOPA, including:

  • Google
  • Bungie
  • Wikipedia
  • Mozilla Foundation
  • Tucows
  • NVIDIA 

Below is a quote from the SOPA Strike.

On January 18th, 2012 the internet is going on strike to stop the web censorship bills in Congress!  Now is our moment— we need you to do everything you can, whether you have a website or not.

Next Page »