background preloader

WordPress CMS › Plate-forme de publication › WordPress Geekeries

WordPress CMS › Plate-forme de publication › WordPress Geekeries

Tout savoir sur la gestion des miniatures (thumbnails) avec WordPress Depuis la version 2.9 de WordPress, les miniatures d’articles ont fait leur apparition sous la forme d’un module « Image à la une » dans l’éditeur. Ces miniatures nécessitent que le thème prenne en charge une telle fonctionnalité ce qui est encore loin d’être le cas. Je vous propose donc de suivre ce tutoriel pour rendre compatible votre thème et de bénéficier ainsi d’une fonctionnalité au combien utile. La plupart des blogs actuels affichent une miniature pour accrocher le lecteur à côté du titre et de la description d’un article. Activer la prise en charge des miniatures d’articles Pour activer la prise en charge des miniatures, rendez-vous dans le module Apparence puis Éditeur. Editez ensuite le fichier functions.php et rajoutez les lignes de code suivantes : if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); } Ce bout de code active le module Image à la une dans l’éditeur de WordPress. Choisissez un fichier image à définir comme une image à la une Ou

Twenty Eleven Theme Twenty Eleven is the default theme for WordPress in 2011. There are tons of really cool improvements and features packed into it — more Post Formats, beautiful new header images, alternate color schemes and layouts, even custom link colors. All those features add up to the best part of Twenty Eleven: just how customizable it is. It looks great as a blog, a showcase of all your posts, and even a tumblelog or photolog. Post Formats Twenty Eleven features seven Post Formats that help the look of your blog posts better match what you’re publishing. The Aside Format is for shorter posts of about 1 paragraph. The Link Format looks a lot like the Aside post but if you’re using the Twenty Eleven Ephemera Widget to display a list of your recent Aside and Link posts (found in Appearance → Widgets) the title of your Link posts will point to the URL of the first link in your post instead of pointing back to the post on your blog. The Gallery Format is meant for posts using the Gallery shortcode.

10 Awesome Shortcodes For Your WordPress Blog Last week I featured three tips for effectively utilizing shortcodes. Now what’s the point in having all of that knowledge if you can’t use it? It’s time to get down and dirty with some shortcodes that you can use on your WordPress blog right now. Your level (or lack) of expertise doesn’t matter – shortcodes can be successfully implemented by anyone who knows how to copy and paste! Every single one of these shortcodes has been tested and works with WordPress 3.3.1. Hello World! Don’t worry – I am not trying to suggest that a really helpful shortcode is one that allows you to display “Hello World!” The potential applications are endless – you could use a shortcode like this any time that you wish to display something on more than one page (such as social sharing buttons, a newsletter signup form, or a simple call to action). As you can see, it is very simply to change what message you want to display, and you can include full-blown HTML and CSS. Most Recent Post Related Posts Display AdSense

Handy WordPress Code Snippets for Your Themes Part 2 Ive mentioned before abuot the importance of having an army of useful code snippets and functions you can use when coding your WordPress themes, I found this really cool website which lists loads of them so check it out. Today’s post is a roundup of some of the most handy ones I could find. Pagination without a Plugin This snippet creates a classic paging navigation like the one seen in WP-PageNavi, which give a better overview for the user. It’s easy to implement and gives you total control over the output. Then add this to your theme within the loop : You can use the following CSS to customise the look : Limit Number of Words in the Excerpt This snippet let’s you limit the allowed number of words used in the exerpt. Then add this to your theme within the loop, change 41 to the number of words you wish to use : Add custom post type to feed If you’re using custom post types on your WordPress site, you have to manually add it to the main RSS feed. Pull in the tags related to a category

How to Display Recent Posts in WordPress Displaying Recent posts often helps your users to visit them easily specially on the sidebar of a single post page. But in some designing processes people want to display recent posts in many different ways. In this post, we will show you various different ways you can display the recent posts in WordPress. Displaying Recent Posts in a List Format The list format is mostly used in sidebars of WordPress pages. You can change the number 10 to the number of posts you like to display. If your theme support Widgets, then there is an easier option for you. Displaying Recent Posts with Summary Some people like to display recent posts with a title and a short description. The first way is: <ul> <? And you make sure that the excerpt is a short description of the post. Another way to limit the number of characters displayed in the content is by manually stripping out post content during the query to display only a limited number of characters. Displaying Recent Posts with Full Content <ul> <?

How to Create a Theme Development Environment for a Live WordPress Site – Inspect Element 11th January, 2010 Tom Kenny Tutorials Any good website owner knows that they need to be constantly looking at ways to improve their site even through small little tweaks. If you’re using WordPress you’ll notice that it isn’t easy to create a development version without creating a separate installation. With the help of an excellent plugin for WordPress called Theme switch and preview, this tutorial will allow you to easily switch between the live site and development versions using two different themes on the same installation of WordPress. While there may well be a Worpdress plugin that does everything below, it’s much more rewarding and satisfying to create your own solution. Step 1: Install Theme Switcher WordPress Plugin First step is to install the aforementioned plugin, Theme switch and preview. Screenshot of the themes installed on Inspect Element as seen in Theme Switcher's settings. Step 2: Create a Copy of the Current Theme Step 3: Add the Dev Bar to the Live Theme <? <? <?

45+ Fresh Wordpress Tutorials, Techniques and Hacks In this article we have collected 45 fresh WordPress tutorials and techniques, with some hacks, guides and best practices thrown in for good measure. Everyone, not just developers, should take something from this round-up. The growth and popularity of WordPress continues to spiral to a seemingly endless end. It continually proves itself time time and again that it has very few limitations, and is rapidly pushing itself to being, if not the best, but certainly the most versatile CMS available. Out of the box it is certainly not perfect, but in the hands of the huge WP community, it might just be. How To Create a WordPress Theme: The Ultimate WordPress Theme Tutorial In detailed 11 individual lessons this tutorial will show you how to build a powerful, up-to-date, SEO friendly WordPress theme from scratch. Custom WordPress Homepage with Customizable Widgets How to Build a Custom WordPress Theme from Scratch WordPress Theme from Scratch How To Design A Clean and Minimal Portfolio Website

5 Ways To Include Template Files In WordPress As long as you work with WordPress, you’ll realize that some code is repeated itself many times, like the loop. The new Twenty Ten theme in WordPress 3.0 has put loop code in into a loop.php file to make it separated, and when it’s needed, just include it into theme file. Why don’t we follow that? Separating a repeatitive code into a file is a good way to organize and manage code. It keeps our code cleaner, easier to read. 1. The first way to include a template file into current file of course is built-in PHP instructions: include and require: include TEMPLATEPATH . or include(TEMPLATEPATH . (We can use it as PHP instruction or as function) This method is fastest way because it does the job as simple as possible. 2. load_template() load_template() is just the WordPress version of require()! load_template(TEMPLATEPATH . 3. locate_template() To check file existence, we can use locate_template(). locate_template($template_names, $load); 4. get_query_template() They can be used like this:

Related: