background preloader

Wordpress

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?

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. 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. To write a WordPress plugin, we first need a sense of direction. Object oriented code is based on classes and methods (functions). PHP classes have a constructor function, __construct, which is executed as soon as a new instance of a class is instantiated. 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 ); 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. Query_posts( 'post_type=my_post_type' ) WordPress Plugin Development Course for Beginners - Part 1. With the huge array of themes available for WordPress, you can create almost anything, from online magazines to advanced e-commerce businesses.

WordPress Plugin Development Course for Beginners - Part 1

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. 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. Check out Zac’s other WordPress courses and enjoy a free, two-week trial of Treehouse. You don’t have to have built a theme from scratch before to successfully follow along. However, we do assume that you are comfortable doing things like adding and editing posts in the admin area or installing plugins. The theme we will build is based on the Basic marketing site example you can find over on the Bootstrap examples page.

Custom homepage designAbout pageContact pageNews section with commentsA widgetized sidebar Getting Started. 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. . « Stay tuned! 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.