Enjoyable WordPress theming with Timber (and ACF)

I was thinking of doing an in-depth tutorial on Timber. A few days since I started a draft, CSS-Tricks published “Timber and Twig Reignited My Love for WordPress“, which is a great read. However, I decided to push some of it live because this plugin deserves more love.

I’ve built a lot of WordPress sites. Recently, it has become more tedious work for me. Not for their complexity —most of corporate sites are fairly straightforward—, but because of the amount of work you have to do in Spaghetti code.

This situation changed when I found two amazing plugins: ACF (Advanced Custom Fields) and of course, Timber. Continue reading

Loop list in batches using Twig (or plain PHP)

Recently I had to loop through a series of elements in a WordPress template (thanks Timber), which happened to be using Bootstrap.

If you ever used Bootstrap, you are familiar with the following markup:

The problem here is very common. You have to:

  • Loop every 3/4/n items.
  • Insert a separator or whatever every 3/4/n items.

Continue reading

Sync local and remote WordPress database

This is just a big heads-up to every WordPress developer out there, just to let them know that syncing a development/staging database doesn’t have to be a nightmare.

There’s this plugin called WP Sync DB which works like magic.

As a reader also suggests, WP Sync DB also has plugins that build upon the main funcionality. For example, wp-sync-media-files, to sync also, well, media files. But there are more.

  • GitHub Repo: https://github.com/wp-sync-db/wp-sync-db
  • Website: http://wp-sync-db.github.io/
  • WP Sync DB GH Page (repo and more plugins): https://github.com/wp-sync-db

Fest Contrapedal 2013

Ayer lanzamos junto a GRMN y todo el equipo de Contrapedal el sitio web del Fest, edición 2013.

Este será primer trabajo oficial bajo el nombre de MONTAG, proyecto que formamos junto a Germán.

Los invito a visitar el sitio, ver la programación y asistir a los espectáculos, el baratón, paneles e instalaciones:

Fest Contrapedal 2013




Ha sido detectada una vulnerabilidad seria en el script Timthumb, un script para redimensionar imágenes desde el servidor escrito en PHP e incluído en muchos themes de WordPress.

Al parecer podría haber varias formas para evitar el riesgo, una de ellas es esta:

  1. Descargar la última versión del plugin: Timhumb 1.33.
  2. Buscar el archivo del plugin (con SSH podemos hacer ” find . -name ‘timthumb.php’ “).
  3. Ir a la línea 27, que debería comenzar con $allowedSites = array (... y cambiar la lista de sitios permitidos por $allowedSites = array();
  4. Guardar el archivo.

Hay otras alternativas que quizá puedan funcionar, pueden verlas en los comentarios del post donde se anunció la vulnerabilidad: Zero day vulnerability in many WordPress themes.

© 2018 Ignacio Toledo

Theme by Anders NorénUp ↑