background preloader


Facebook Twitter

WordPress wp_ajax returning 0 error. This morning I spent a little time constructing an ajax call from a front-end page (not an admin page) using wp_ajax.

WordPress wp_ajax returning 0 error

As is my wont, I tested this in Firefox and all was well. I used the WP codex. Then I tried it in Opera and it failed, no response whatsoever, just a 0 in the ajax response. Seemed odd that Opera should have a problem, tried it in Chrome, same thing. Lots of Googling later, saw loads of similar questions being asked, no answers… I then looked at the code in wp_ajax, and all became clear… I had entries in my functions.php as follows: add_action('wp_ajax_myfunction', 'myfunction'); function myfunction() { } So if I pass an action of ‘myfunction’ to wp_ajax it should call the hook at the top of the above code, which in turn calls myfunction(), right?

Having identified this it’s then simple to add another hook to your functions.php: Custom columns for custom post types. I got a bit inspired by Joost de Valk’s post on custom post type snippets.

Custom columns for custom post types

Joost provided some code snippets for adding custom columns on the edit posts page for custom post types. While the snippets are handy, I wanted to dive into this subject just a bit more. This tutorial assumes you already know how to create custom post types and taxonomies. If not, you’ll want to check out these tutorials on post types and taxonomies. This tutorial will walk you through creating custom columns for your post types and making these columns sortable. Metadata: Ordering posts by meta value based on a specific meta key.Taxonomy: Creating links to allow the user to view all posts with a specific term.

The setup In this tutorial, I’m using a few different things to show how the methods used work: movie: Name of my custom post type.genre: Name of a taxonomy to group movies.duration: Post metadata key (custom field) to represent the length of the movie in minutes. That’s pretty bland and boring. Plugin Templating within WordPress. Create WordPress Plugins with OOP Techniques. Object-oriented code, among other things, can help organize and add reusability to your code.

Create WordPress Plugins with OOP Techniques

In this tutorial, I will teach you the basics of writing a WordPress plugin using object oriented techniques. We'll be using Dribbble's API as an example for this tutorial. Ready? Benefits of using OOP for WordPress plugins.How to setup a shortcode.How to setup a template tag.How to enable shortcode in WordPress widgets.Real-world example by using Dribbble's API. Before moving forward with this tutorial, you should have at least an elementary understanding of writing a WordPress plugin. Creating WordPress plugins with object oriented code is quite efficient and tidy, when compared to using procedural code. WP Log in Browser. I'm working on a nice admin screen to config auto-logging of some common things (like wp_query in pre_get_posts and wp), and some other goodies.

WP Log in Browser

To log things manually, you can use: browser()->log ( $var, $label ); browser()->warn ( $var, $label ); browser()->info ( $var, $label ); browser()->error( $var, $label ); Also, commandas are chainable: How To Design And Style Your WordPress Plugin Admin Panel. The great thing about WordPress is that it's highly customizable and flexible.

How To Design And Style Your WordPress Plugin Admin Panel

Within a WordPress plugin, almost all of the fields could be change to your desire results. When you are building a WordPress Plugin, chances are there is a need for you to create some admin pages for the users to customize the setting they want. WordPress admin default has their own CSS style and you can make use of it for your WordPress Plugin Admin Panel if you require one. If you require additional styling for your admin panel, you can also link in an external CSS stylesheet within your plugin. Below, we'll show you some default WordPress CSS styling and how to link in an external CSS stylesheet. WordPress Custom Post Types Get Into The Loop. WordPress started a new era with the Custom Post Types for developers in the WordPress environment.

WordPress Custom Post Types Get Into The Loop

The possibilities are numerous and primarily from the knowledge of the developer dependent. Nevertheless, there are so many tutorials how to use Custom Post Types in WordPress, but that is not enough - at least not in most cases and therefore are various other steps necessary to make the use of CPT more efficient and smooth. In this article I would like to briefly explain how to get content of Custom Post Types in the loop of WordPress. This is not a complete guide, but please feel free to add tips, critics, hints in our comment area. The screenshot is an example of the use of CPT, hereby were the Plugins Archive und Snippet created, they have different tasks and via CPT tailored to the requirements you need. In the first case, the syntax is shown how to use the query and passes through the type of the CPT via parameters.

WordPress Plugin Development Course for Beginners - Part 1. I assume that you are a freelance designer or someone who work full time as a designer for a web design agency.

WordPress Plugin Development Course for Beginners - Part 1

Most of web designers are used work with static website design. Now the question is: do you have a future as a static website designer? The answer would probably be no since most clients and companies are planning to convert their websites to work with a CMS like WordPress, Joomla or Drupal. WordPress is becoming the new static web site. SEO Wordpress, le guide complet du réferencement naturel. WordPress est un outil, un CMS.

SEO Wordpress, le guide complet du réferencement naturel

Nous en avons déjà parlé bien des fois sur VidéoNoob. Ce CMS Open Source a d’ailleurs un tel succès qu’il semblerait que plus de 8% des sites à l’échelle mondiale soient animés par ce fabuleux moteur. Le référencement naturel est un concept, un ensemble de techniques qui vont rendre votre site ou blog visibles via les moteurs de recherche. Il en résultera donc à moyen et long terme une potentielle augmentation de traffic. Mais ne perdez jamais d’esprit que seules les interactions de vos visiteurs avec vos contenus sont représentatifs d’une réelle qualité. Anatomie d’une page WordPress. C ‘est une des grandes forces de WordPress : des milliers de thèmes sont disponibles, gratuitement ou non, pour permettre à chacun de créer un site ou un blog à son image.

Anatomie d’une page WordPress

Mais comment est-ce que tout cela fonctionne ? How to Build a Responsive WordPress Theme with Bootstrap. In this tutorial, we will learn how to make our own responsive WordPress theme using Bootstrap.

How to Build a Responsive WordPress Theme with Bootstrap

Bootstrap is a responsive framework for building web sites and applications, and it’s a great starting point for building a responsive WordPress theme. Créer un thème de A à Z - Tutoriel WordPress. Créez votre thème Wordpress de A à Z. Update du 5 Octobre 2011: les tutoriels ont beau datés de 2007, ils sont en cours de modifications pour y ajouter les fonctionnalités des dernières versions de WordPress. Quoi qu’il en soit, ils sont toujours d’actualité et ont été mis à jour plusieurs fois. Peut-être que vous aimeriez créer votre propre thème pour votre blog et que vous ne savez pas trop comment vous y prendre ? Et bien, dans les semaines qui vont venir, je vais vous expliquer les différentes étapes à suivre, pas à pas, pour que n’importe qui (ou presque) puisse créer son propre thème.

On va voir l’installation de WordPress sur votre ordinateur, les différents types de fichiers, leurs hiérarchies, et les interactions entre eux. On va ensuite apprendre à créer un thème relativement simple avec Photoshop et comment l’intégrer dans les différents fichiers. Quoi qu’il en soit, quelques petits prérequis seront nécessaires. 35 Free and Professional-looking WordPress Themes. A theme is the backbone of any website and no blogger wants a poorly designed website. The theme is the part of your blog which will reflect who you are, and what you think of, so it’s very important to have a suitable yet highly attractive theme that will match the purpose of your blog. When it comes to selecting good quality themes, however, most bloggers are not ready to pay big bucks for premium themes. Professional yet free WordPress themes are hard to find, but when quality is your first priority, you need to have the best theme for your WordPress blog.

We all know that there are lots and lots of sites out there where you can get great-looking, jaw-dropping WordPress themes for your blog. But almost all of them will make your wallet lighter.