background preloader

Wordpress

Facebook Twitter

Code.tutsplus. The wp_enqueue_script function is the best solution for loading JavaScript files into your WordPress site. If you're developing a theme that uses JavaScript or JavaScript Libraries, the wp_enqueue_script function is the way to go. If you haven't really used this before though, it can be confusions... so today, we'll be taking an in depth look into how to properly load scripts into your theme or plugin using the enqueue function. Subsequent Changes to Techniques & Software Certain aspects of applications or techniques used in this tutorial have changed since it was originally published. This might make it a little difficult to follow along. We'd recommend looking at these more recent tutorials on the same topic: How to Include JavaScript and CSS in Your WordPress Themes and Plugins If you're coming from a basic HTML background, you're probably used to simply loading up Javascript files (including anything from jQuery to plugin scripts) directly into the header or footer of your document.

Create Custom Tables In WordPress. If you are creating your own WordPress plugin you may want to store data inside the WordPress database. There are a few options that you can use for this, you can create a custom settings page using the Settings API, save the data directly in the option table by using set_option() and get_option() or the third option is to create your own database tables and store your data in here. In this tutorial we are going to look at the process of how you will create custom tables in your WordPress plugin. When you use a plugin that will use custom tables you need to make sure that these tables will exist before you try to store data in them.

To make sure that these tables exist you should automatically create these tables when the plugin is activated. WordPress has a function hook that you can use to run a function when the plugin is activated. It also comes with a function hook that will run a function when you deactivate the plugin. Create Table On Plugin Activation Getting Data From Custom Table. Custom Metaboxes and Fields for WordPress (CMB2) Now Out of Beta. The Custom Metaboxes and Fields for WordPress (CMB2) plugin is now officially out of beta and ready for public use.

The tool was created to make it easy for developers to create metaboxes and forms with custom fields. Developers at WebDevStudios took over the original CMB GitHub repository from Jared Atchison, its original creator, in December of 2013. Justin Sternberg explained why WebDevStudios chose to start contributing to the CMB2 project: After having been burned by some issues with other custom field plugins, we determined it was best to stick with code that we had some control over. We fell in love with CMB because it was a library we could include in any of our projects and it would just work while letting us keep all of the field configuration in the code, and more importantly, in our version control system. “CMB2 was built with a new mechanism to ensure it only loads the most recent version of CMB2 in your system,” Sternberg said.

Like this: Like Loading... Related In "Plugins" How to load JavaScript like a WordPress Master. Update: See Conditional Script Loading Revisited for WordPress 3.3 and newer. If you’re involved in WordPress development, a challenge that you’re going to face sooner or later is how to include JavaScript files efficiently. In this tutorial, I’m going to show you the best way to do that. Let’s say you have a plugin that adds a custom shortcode. The shortcode needs some JavaScript code which requires jQuery.

If you’re just starting out with WordPress development, you might be tempted to write something like this: How a WordPress Youngling does it add_action('wp_head', 'add_my_script'); function add_my_script() { ? Let's see what's wrong with that approach: Firstly, since WordPress 2.6, the user can move the wp-content directory wherever he wants. Secondly, if the user installs another plugin that also uses jQuery, the page will end up with jQuery being loaded twice. Fortunately, WordPress lends us a hand with these two problems: How a Padawan does it That's an obvious improvement. Trent - Responsive One Page Parallax Template.

Trent is a new portfolio template for creative agencies and freelancers. Graphic designers, illustrators, photographers or any kind of creative is now able to create a quick and easy portfolio to showcase their projects with a distinctive and creative touch. 7 Awesome Demos Template Full Screen Slider with animated captions and 3 types of transitions (vertical an horizontal slide & fade) Individual section header parallax image on each external page (custom height and overlay color) Awesome project expander (preloader is waiting for images to load first in background) Amazing external project pages designs Modern and standard navigation menu Functional twitter feed slider Functional ajax contact form Retina Ready an fully responsive All shortcodes are designed for dark and white background Masonry and standard blog Font awesome 4 included And much more…

Diseño Web: Area Mobildec. Queremos enumerar los aspectos técnicos que nos parecen interesante del diseño web de Área Mobildec. No queremos ponernos a describir todo el tedioso proceso, pero si dejar los detalles más inusuales. Herramientas y tecnologías utilizadas Tips & Tricks Problema con la cantidad de entradas cargadas en movil y desktop Por resolución y tiempo de carga, en un móvil no queríamos cargar más de 4 entradas mientras que en otros dispositivos queríamos cargar 8.

¿Porqué no estoy contento con esa solución? Así que implementamos el script bastardo: mobileDetect. Menú Como podéis apreciar, el menu en móvil está bastante centrado en pantalla: eso fue intencional y nos mola saber que el usuario tiene todas las opciones para moverse por la web nada más entrar. Los menús de las redes sociales están arriba del todo en móvil, pero en resoluciones ya acercándose a tablets, bajan al centro y reposicionamos casi todos los elementos.

Footer Entradas <span data-precio="<? Los estilos con CSS son muy explícitos: Crea e Collega una Tassonomia in WordPress. Le tassonomie all'interno di WordPress sono qualcosa di veramente importante che ti permettono di strutturare gli articoli contenuti nelle tue pagine e non soltanto; grazie a queste potrai aggiungere ai tuoi CPT categorie e tag personalizzati per catalogare qualsiasi contenuto. Onestamente non so come e sopratutto se stai utilizzando stai utilizzando le Categorie e i Tag che questa piattaforma ci mette a disposizione durante la creazione dei tuoi articoli, ma se tu ancora non lo facessi lasciami dire che stai facendo un grosso errore. Questa è ovviamente una personale opinione ma quello che voglio affrontare in questo articolo è come creare delle tassonomie personalizzate sia per i tuoi articoli che, ancora meglio, per i tuoi CPT. Perché in fin dei conti lo sappiamo tutti, avere delle categorie e dei tag generali per qualsiasi contenuto può sembrare molto limitante, sopratutto se stiamo sviluppando qualche plugin o tema personalizzato.

Tutto Dentro una Cartella Dichiarazione Tassionomie <? The Events Calendar for WordPress: Tutorials. A Complete Guide to Essential WordPress Plugins. WordPress’s power comes from its plugins. The core version of WordPress can be used for a simple blog or content website, however without plugins your website would lack features and be susceptible to spam and malicious attacks. With over twenty eight thousand free plugins listed in the official plugin directory and thousands more in premium plugin stores such as CodeCanyon; it can be difficult to find the plugins you need. In this article, I have listed what I believe to be the best WordPress plugins available online. Plugins have been grouped into categories. Some plugins, such as backup and caching plugins, should not be used in conjunction with related plugins that offer the same functionality.

Most other plugins can be used together. Caching Caching your website content will help you improve the speed of your website. W3 Total Cache – FREE Recommended by many hosting companies, W3 Total Cache promises to speed up your website by ten times using a variety of techniques. Backups Search. Usando pre_get_posts en vez de query_posts en Wordpress. Como ya sabemos hay varias manera de obtener los posts en WordPress: Vamos a centrarnos en el primero, en el muy utilizado query_posts. Vemos que el codex de WordPress ya nos avisa que algo pasa con query_posts(): “Es preferible utilizar ‘pre_get_posts’ alterando el query principal usando is_main_query” ¿Por qué nos dice esto?

Vamos a ver primero cómo funciona query_posts() y entenderemos enseguida el problema. Cómo funciona query_posts() Al usar query_posts() estamos diciéndole a WordPress que el trabajo que ha hecho recolectando toda la información del post no vale. Otra vez a recolectar todos los datos, y así cada vez que alguien nos visita (a no ser que hayáis tomado la precaución de cachear los datos con transients o similares). Vamos a verlo en un ejemplo. ¿Qué sucedería? ¿Cómo le daríamos las instrucciones pertinentes a WordPress antes de que vaya a recoger los datos la primera vez? Cómo funciona pre_get_posts Donde “nombre_funcion” es el nombre de la función que se va a llamar.

Taxonomías en Wordpress. El uso de Categorías y de Etiquetas (Tags en Inglés) es muy habitual en WordPress. A la hora de crear una nueva entrada podemos asignarle una categoría (normalmente una categoría por entrada) y uno o varias etiquetas (normalmente varias etiquetas por entrada). Esto nos permite clasificar la información que estamos publicando para que luego sea más sencillo acceder a ella en función de las necesidades del usuario. Tanto las Categorías como las Etiquetas son Taxonomías.

¿Qué es una Taxonomía? Taxonomía. Por defecto, WordPress incluye tres taxonomías: categoría, etiquetas y categoría de los enlaces. Desde WordPress 2.8 es mucho más sencillo crear Taxonomías propias (Custom Taxonomies en Inglés) que nos pueden dar más flexibilidad que las tradicionales Categorías y Etiquetas. Sigamos con el ejemplo de la web de música. La idea es poder fijar toda esta información a una entrada que realices sobre esta canción de forma parecida a como lo harías con las etiquetas. Taxonomías en páginas. Basics for Webmasters.

Add special tags to your page for richer stories Some of our Social Plugins such as the Like Button or the Share Dialog are used to share content from your site to Facebook, where it is seen by the friends of the person who liked or shared it. To get the content of the story that is shared to Facebook, each page with a plugin is scraped (a process where an automated system loads a page and captures some of the content from it) when the plugin is used. On a regular HTML page this content is basic and may be incorrect, because the scraper has to guess which content is important, and which is not. Site authors can take control of what the Facebook scraper picks up from each of their pages by using meta-tags. These tags provide structured info about this page (such as the title, the image that accompanies it, etc.) and essentially turns that page into what we call a custom story 'object'. The simplest way to do this is to add some of the standard tags to the <head> of your pages, for example:

Nello

PDF.js viewer. Step-By-Step Guide — Moving A WordPress Website Without Hassle. Advertisement Moving WordPress is a task that many people find daunting. The advice on the Codex, while comprehensive, gives you a myriad of options and doesn’t describe the process simply and in one place. When I had to move a WordPress installation for the first time, I spent hours searching online for information on the various aspects of the process, and eventually wrote myself a checklist — which I still use. So to save you the hassle, here’s a step-by-step guide to moving a WordPress website.

I’ll cover three different scenarios, which in my experience are the most common: Moving a website from a subdirectory of a domain to the root directory (for example, if you’ve been using a subdirectory for development while not affecting an existing website that’s in the root);Moving a website from a local installation to a remote installation; andMoving a website between domains or hosts. Before You Start Before you start any of these methods, make a backup of your website: Beware!

1. 2. 3. 4.