I AM LISTENING TO
|
WHAT I LIKE
  • English
  • German


BLOG FILTER



In a current project I am using pages as templates, to load content into specific containers on the website. The website will be using up to 15 different languages.

The main language setup is done through WPML, which creates linked content per language. This helps, as some languages will fail terribly when translating them through a pure gettext setup, as the words setup is often completely different.

But there is always static stuff that can be translated directly through the language files. For that I use a simple shortcode that allows me to keep the native language as a basis in all linked content. Easier to move around, as I can actually read and understand it :)

Call the shortcode from the functions.php

The shortcode function itself. This loads the language textdomain from the specified location and translates the string.

How to use it in your post or page content

 

readmore

Conditional Tags are a powerful thing in WordPress and especially handy to show or hide things.

“The Conditional Tags can be used in your Template files to change what content is displayed and how that content is displayed on a particular page depending on what conditions that page matches. ”

Two plugins are part of my essentials, that utilize the Conditional Tags:

  1. Widget Logic
    “This plugin gives every widget an extra control field called “Widget logic” that lets you control the pages that the widget will appear on. The text field lets you use WP’s Conditional Tags, or any general PHP code.”
  2. Menu Item Visibility Control
    “Using this plugin you can use WordPress Conditional Tags to enable or disable menu items on the front-end. It works like ‘Widget Logic’ but for menu items.”

You can easily define your own Conditional Tags in your functions.php or plugin.

readmore

  1. Pixel-perfect
  2. Retina-ready
  3. Fast
  4. Consistent
  5. Hackable
  6. No tracking

Shield.IO

readmore

This time picker provides a unique way to enhance your input fields. Use a clock interface to enter the time. The plugin works with Bootstrap or standalone.

Part of my essentials :)

ClockPicker

readmore

Datedropper is a jQuery Plugin that provides a quick and appealing interface to enter dates. Nice little plugin to spice up your interface.

Definitely part of my list of essentials :)

datedropper

readmore

The first two headers prevent the browser from caching the response and the third sets the correct MIME type for JSON.

Than just output your JSON data

 

readmore

NextGEN Facebook (NGFB) gives you total control over the information social website crawlers need, improving Google Search ranking, social engagement, and click-through-rates on Facebook, Google+, Twitter, Pinterest, LinkedIn, StumbleUpon, Tumblr and and many more”

A powerful plugin for WordPress, but it sometimes displays many image dimension errors. Even if those errors remind me to optimize the page or post, I sometimes prefer to ignore these during development :)

Here a simple way to hide them:

 

readmore

When loading web-fonts, we often see a brief un-styled moment before the browser applies the actual font. Gladly Typekit and also Google Web Fonts provide an option around that.

Both are using WebFont Loaders to help handle those brief moments.

TypeKit Webfont Loader Example

This adds a class name to the <html> element during loading

This is removed when loading is done. This allows us to hide content until all fonts are loaded.

Webfonts Loading

This also adds classes once the webfonts have been loaded, which allows us to add some transitions to reveal the content again.

Webfonts Loaded

One last thing. You should add the webfont loader early in your content, so that it can do its magic before anything else is being loaded.

readmore

Parent

Child

 

readmore

Adding Metaboxes in WordPress to your admin areas normally involves 3 steps:

  1. Action to define the metabox area
  2. Callback to define the metabox content
  3. Action to handle the metabox updates / saves

This can be done much easier using Custom Metaboxes and Fields for WordPress, which is a metabox, custom fields and forms library. The library provides a bunch of custom fields and also allows you to add your own easily. Much easier to build new Metaboxes fast!

List of field types included:

  1. title An arbitrary title field *
  2. text
  3. text_small
  4. text_medium
  5. text_email
  6. text_url
  7. text_money
  8. textarea
  9. textarea_small
  10. textarea_code
  11. text_date Date Picker
  12. text_time Time picker
  13. select_timezone Time zone dropdown
  14. text_date_timestamp Date Picker (UNIX timestamp)
  15. text_datetime_timestamp Text Date/Time Picker Combo (UNIX timestamp)
  16. text_datetime_timestamp_timezone Text Date/Time Picker/Time zone Combo (serialized DateTime object)
  17. colorpicker Color picker
  18. radio *
  19. radio_inline *
  20. taxonomy_radio *
  21. taxonomy_radio_inline *
  22. select
  23. taxonomy_select *
  24. checkbox *
  25. multicheck
  26. taxonomy_multicheck *
  27. taxonomy_multicheck_inline
  28. wysiwyg (TinyMCE) *
  29. file Image/File upload *†
  30. file_list Image/File list upload
  31. oembed Converts oembed urls (instagram, twitter, youtube, etc. oEmbed in the Codex)
  32. group Hybrid field that supports adding other fields as a repeatable group. *

Simple example from the CMB2 Github page

 

readmore