Navigation Menus Navigation Menus Languages: English • 日本語 • Slovenčina • 中文(简体) • (Add your language) Navigation Menu is a theme feature introduced with Version 3.0. WordPress includes an easy to use mechanism for introducing customised navigation menus into a theme. In order to incorporate menu support into your theme, you need to add a few code segments to your theme files. Function Reference Register Menus Firstly, in your theme's functions.php, you need to write a function to register the names of your menus. function register_my_menu() { register_nav_menu('header-menu',__( 'Header Menu' )); } add_action( 'init', 'register_my_menu' ); And this would make two menu options appear, header menu and extra menu - function register_my_menus() { register_nav_menus( array( 'header-menu' => __( 'Header Menu' ), 'extra-menu' => __( 'Extra Menu' ) ) ); } add_action( 'init', 'register_my_menus' ); Display Menus on Theme Once you've done that, your theme will be almost ready. <? Menus Panel External Resources Related
Using the WordPress Uploader in Your Plugin or Theme WordPress has a nice media uploader dialog that it uses on the editor pages. Now wouldn’t it be nice if you could use it to handle image uploads for part of a plugin or theme you’re writing? Maybe you want to add an easy way to change the logo in a theme? A simple “Upload Image” button would work quite well for that, wouldn’t it? It’s fairly simple to implement, providing you already have a bit of experience with the WordPress API. The first step is to prepare your HTML. <tr valign="top"><th scope="row">Upload Image</th><td><label for="upload_image"><input id="upload_image" type="text" size="36" name="upload_image" value="" /><input id="upload_image_button" type="button" value="Upload Image" /><br />Enter an URL or upload an image for the banner. Now that the easy part is out of the way, it’s time to start making it do something. function my_admin_scripts() { wp_enqueue_script('media-upload'); wp_enqueue_script('thickbox'); wp_register_script('my-upload', WP_PLUGIN_URL.' That’s it.
Template Tags Languages: English • Español • Français • Italiano • 日本語 • 한국어 • Português do Brasil • Русский • ไทย • Türkçe • 中文(简体) • 中文(繁體) • (Add your language) Template tags are used within your blog's Templates to display information dynamically or otherwise customize your blog, providing the tools to make it as individual and interesting as you are. Below is a list of the general user tags available in WordPress, sorted by function-specific category. For further information on template tags and templates in general, see the following: Stepping Into Template Tags - an introduction to Template Tags. Anatomy of a Template Tag - details of how to put Tags into Template files. Note: If you have an interesting twist on the implementation of a template tag, you're encouraged to add to its documentation for the benefit of other WordPress users. Files Template tags files are stored in the wp-includes directory. Tags General tags wp-includes/general-template.php Author tags wp-includes/author-template.php
Theme Development Languages: বাংলা • English • Español • 日本語 • 한국어 • Português do Brasil • Русский • 中文(繁體) • (Add your language) This article is about developing WordPress Themes. If you wish to learn more about how to install and use Themes, review Using Themes. This topic differs from Using Themes because it discusses the technical aspects of writing code to build your own Themes rather than how to activate Themes or where to obtain new Themes. Why WordPress Themes WordPress Themes are files that work together to create the design and functionality of a WordPress site. You may wish to develop WordPress Themes for your own use, for a client project or to submit to the WordPress Theme Directory. To create a unique look for your WordPress site. A WordPress Theme has many benefits, too. It separates the presentation styles and template files from the system files so the site will upgrade without drastic changes to the visual presentation of the site. Why should you build your own WordPress Theme? style.css
Database Description Languages: English • العربية • 日本語 中文(简体) • 한국어 • Русский • (Add your language) The following is an outline and description of the database tables created during the standard installation of WordPress. The database structure and the diagram below were last updated in version 4.4. The only database supported by WordPress is MySQL version 5.0.15 or greater, or any version of MariaDB. Also see prior versions of Database Descriptions for WordPress 1.5, WordPress 2.0, WordPress 2.2, WordPress 2.3, WordPress 2.5, WordPress 2.7, WordPress 2.8, WordPress 2.9, and WordPress 3.3. Because WordPress interfaces with this database by itself, you as an end user, shouldn't have to worry much about its structure. Database Diagram The diagram below provides a visual overview of the WordPress database and the relations between the tables created during the WordPress standard installation. (WP 4.4.2 Database diagram) Table Overview Table Details Indexes Table: wp_links Table: wp_options Table: wp_posts Table: wp_site
WordPress hooks database - action and filter hooks for wp plugin developers -- Adam Brown, BYU Political Science What is a hook? In brief, WordPress hooks enable you to change how WordPress behaves without editing any core files. Because you leave the WordPress files untouched, you can painlessly upgrade your blog with each new version of WordPress. It's this hooks architecture that makes WordPress the best blogging solution. If you don't know what WordPress hooks are for, read the Plugin API or this tutorial. What is this directory? If you're a plugin or theme developer, you know how difficult it can be to figure out which hooks are available. What is this good for? See what new hooks are available with each new version of WordPress See which hooks have been deprecated or renamed (use the "view all hooks" option) Easily learn exactly which WP file(s) use each hook. How to help? Update and improve the official action and filter references.
How to Pass Tag Parameters How to Pass Tag Parameters Languages: English • Italiano • 日本語 • (Add your language) Introduction Template tags are PHP functions you can embed in your WordPress page templates to provide dynamic blog content. And like PHP functions, many template tags accept arguments, or parameters. Template tag parameters are variables you can use to change a tag's output or otherwise modify its action in some way. In regards to parameters, WordPress template tags come in three "flavors." Tags without parameters Some template tags do not have any options, and thus have no parameters you can pass to them. The template tag the_author_firstname() is one that accepts no parameters. Tags with PHP function-style parameters For template tags that can accept parameters, some require them to be in the default PHP style. The bloginfo() tag accepts one parameter (known as the show parameter) that tells it what information about your blog to display: Important points to keep in mind for PHP function-style parameters:
How To Create a WordPress Theme: The Ultimate WordPress Theme Tutorial Update: We’ve created a second edition of this popular tutorial! It contains updated code samples, coverage of the latest theme development techniques, and more. Check it out at The ThemeShaper WordPress Theme Tutorial: 2nd Edition. In only 11 individual lessons this WordPress Theme Tutorial is going to show you how to build a powerful, up-to-date, WordPress Theme from scratch. As we go along I’ll explain what’s happening including (for better or worse) my thinking on certain techniques and why I’m choosing one path over another. Skip to the Table of Contents. Here’s the list of features your finished theme will be able to boast of: I think that’s kind of impressive—for any WordPress Theme. At the end of this tutorial, with code in hand, you’ll be able to do almost anything you want. I’ve already used it to start another project of my own, The Shape Theme. WordPress Theme Tutorial Table of Contents Like this: Like Loading...
WordPress Channel - Podcasts, tutoriels et ressources sur WordPress Admin Notices in WordPress Occasionally a plugin or theme will need to display a notice to users in the WordPress dashboard. This is fairly easy to do using the admin_notices hook, which shows a standard message box at the top of the screen. Example Admin Notices Display a Standard Notice Since this div is classed “updated” the notice will display yellow. How To Make a Dismissible Notice With a little more work it’s also possible to display a notice stays present until the user clicks to ignore it. The following example was adapted from the AddThis plugin. If a user clicks to hide the notice, it will save their preference in the user meta. Display Notices Only On Certain Admin Pages If possible, target the notice to only appear on certain pages where the user needs to see them. For example, this notice will only appear on the plugins page: Check User Role Before Displaying a Notice Notices should only be displayed to users that can actually do something about them. Here’s some common roles checks you might want to do:
Theme Review Theme Review Process #Theme Review Process Every theme that is uploaded for inclusion in the WordPress.org repo goes through this process: A theme gets uploaded.A theme goes to the new theme queue.A theme gets allocated a theme reviewer.The reviewer does a review by checking the required items and noting any recommendations.Once the review is done the review is added to the theme ticket.If all the required items aren’t met, the theme should not be approved and left open in reviewing status for updates.If a theme ticket has no update from the theme author for 7 days it may be closed due to inactivity. Top ↑ Timeframes #Timeframes There are no exact time frames for the queues. Allocated tickets without a response from either the theme author or reviewer within 7 days will be closed or reallocated to a new reviewer. The Review #The Review Required #Required There are certain checks that all themes need to pass before they can be put on the WordPress.org theme repository. Notes #Notes
Developper un plugin User:zenbien/fr:Developper un plugin L'objectif principal de l'utilisation des plugins est de maintenir le noyau de Wordpress intact, dans un soucis de stabilité et de mise à jour des futures versions. Un plugin WordPress est un programme, écrit en langage PHP, permettant d'ajouter des fonctionnalités personnalisés à Wordpress. Il existe une multitude d'articles et de ressources pour les développeurs de plugins dans la section Plugin Resources Une bonne méthode pour comprendre le fonctionnement des plugins, est de regarder le code source du plugin suivant : Hello Dolly, installé par défaut sur wordpress Faites la promotion de votre plugin sur le site Plugin Submission and Promotion Le nom du plugin Veillez à ce que le nom de votre plugin soit unique (voir la liste des plugins déposés Plugins ) La plupart des développeurs choisissent un nom en rapport avec la description du plugin, ce nom peut avoir plusieurs mots. Les fichiers Fichier lisez moi Informations en-tête Exemple: License Template Tags
How to Put Amazon Affiliate Links on Your WordPress.com Blog | さまざまの言葉… random items Amazon associates have had some gripes with the free WordPress.com (WP) site. WP places some technical restrictions on blog features in order to prevent nasty people turning WP into an anti-security weapons platform, and toprevent the avaricious from turning WP into the scam capitol of the world. This, unfortunately breaks some of the shiny tools that Amazon provides to their associates. This is neither good nor bad, it’s just an unfortunate collision between two companies with mismatched goals. Here are my personal notes for adding an Amazon associate link to a WordPress.com blog. The Familiar Part The following should be familiar. Log into your Amazon Affiliate account.Click on “Build Link/Widgets”.Click on “Product Links”.Search for the product you desire to showcase.Click on the corresponding “Get HTML” button. At this point, you cannot use the fancy “Text an Image (Enhanced Display)” option. The next best thing is to use the “Image Only (Basic Display)” option. Under “1. The Tricky Part