background preloader

Top 50

Facebook Twitter

Créez vos metaboxes WordPress - guide complet. Les custom metas box sont des boîtes que vous pouvez rajouter dans les pages d’édition de contenu, dans l’administration de WordPress. Grâce à elles nous pouvons enregistrer des informations relatives à un article, à une page, ou à n’importe quel élément d’un Custom Post Type. Cela permet par exemple de renseigner l’URL d’un élément de portfolio, ou bien encore le prix d’un article… Pour résumer c’est une méthode plus clair pour renseigner des valeurs que l’on saisirai habituellement via des custom-fields. Les metaboxes (et les metadonnées) offrent énormément de possibilités quand à la personnalisation de notre CMS favori. Il faut tout de même veiller à les utiliser correctement et à ne pas les substituer à un système de taxonomie ou tout autre fonctionnalité native de WordPress qui serait plus pertinente.

Les usages étant multiples et les possibilités tellement étendues, un article ne suffira pas à traiter la question. La première chose à faire est d’initialiser la metabox. Pourquoi ? Using Anchors in WordPress. Anchors are a very handy way of locating a specific part of a page. They are commonly used on FAQ pages, where a list of questions appears at the top of the page and then clicking on each link will deliver you to the response lower down the page. I had struggled for a while with trying to figure out how to use them in WordPress, but when it came down to it, it was merely a case of adding a little HTML.

Here’s how to do it: First of all, create all the text on your page, including where you will be linking from (a list of FAQs, for example) and where you will be linking to (the anchor – a set of answers for example). Bear in mind that you can use anchors to link to another page altogether, so the link does not need to be on the same page as the anchor. Create the anchor Once you have created all your text, go to the place that you want to place the anchor. Repeat this process for every part of the page that you want anchors, using a different label for each one. Create the link. Convertisseur YouTube vers mp3. Incroyable effet noir et blanc/couleur en CSS3 - Le Blog sur l'informatique qui a du goût! Bananefraise : tutos, astuces, thèmes, design à vôtre goût!

Rédigé par Daniel - 02 avril 2012 Comment passer une photo en noir et blanc sans Javascript et faire un étonnant effet en CSS3? Le but du jeu est cette fois-ci de passer une image couleur en désaturée pour qu'au passage de la souris elle devienne en couleur. J'ai cherché un peu dans les entrailles du web, au fin fond de sites anglosaxons et je n'ai trouvé que des exemples en Javascript avec Jquery...

Il y a bien une propriété en brouillon CSS qui devrait marcher un jour sur certains navigateurs: -webkit-filter: grayscale(1); Chez moi elle ne fonctionne pas sous Chrome ni Safari... J'ai trouvé en revanche une astuce qui roxe sur Firefox: la propriété Filter. Pour pouvoir en profiter il faut mettre dans le dossier de votre site un fichier filters.svg Ensuite insérer ce code dans le CSS: Il reste à retrouver la couleur au survol: enjoy! Développement - Mots clés : CSS3 Les commentaires sont fermés. Support » Getting post thumbnail URL.

How to Grayscale Images in WordPress. Did you ever wonder if there was a way to automatically grayscale images in WordPress when you upload them? Well the wondering time is over. In this article, we will show you how you can use some simple PHP image manipulation tools and WordPress functions to automatically grayscale images upon upload. You can use grayscale images for hover, sliders, gallery, or anything else you like. First thing you need to do is open your theme’s functions.php file and add the following code: The code above simply adds an additional image size for the uploader. The code above pretty much tells the uploader to create an extra size of the image you uploaded. If you were doing this for your post thumbnails, then you can display it like this in your theme: If you want to do this for a specific attachment, then you can use wp_get_attachment_image function. Note: You should change themename to your theme’s name.

All credits for this awesome trick goes to Otto. Function Reference/wp get attachment image. Languages: English • Italiano • 日本語 • (Add your language) Description Returns an HTML image element representing an attachment file, if there is any, otherwise an empty string. Usage Default Usage If the attachment is an image, the function returns an image at the specified size. To get attachment IDs dynamically in a template, you can use get_posts('post_type=attachment'), etc. Parameters $attachment_id (integer) (required) ID of the desired attachment. Default: None $size (string/array) (Optional) Image size.

Default: 'thumbnail' Instead of using an array which requires checking all of the image sizes, you should consider registering a size with add_image_size so that a cropped version is generated. $icon (boolean) (Optional) Use a media icon to represent the attachment. Default: 'False' 1 (True) 0 (False) - Default $attr (string/array) (Optional) Query string or array of attributes. Examples Display all images as a list <ul><? Return Value an HTML img element or empty string on failure. Change Log Related. Custom columns for custom post types. I got a bit inspired by Joost de Valk’s post on custom post type snippets. 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. We’re sorting posts by two different types of data: 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: After adding a few “movies,” the edit posts screen will something look like the following screenshot. That’s pretty bland and boring. Much prettier, right? Telecharger et Convertir les videos de YouTube, Dailymotion, Metacafe : FLUVORE.

How To Create Custom Post Meta Boxes In WordPress. BlackAndWhite, passez vos images en noir et blanc avec jQuery. Top 50...2011/2012 - Le blog de l' After Foot.