module html-css
<?php
/*
Plugin Name: gnoyelle : Contenus personnalisés
Plugin URI: http://wwww.gregoirenoyelle.com
Description: Tous les contenus personnalisés du site (Custom Post Type et Taxonomy)
Version: 1.0
Author: Grégoire Noyelle
Author URI: http://wwww.gregoirenoyelle.com
License: GPL2
*/
/**************************
CUSTOM POST TYPE
**************************/
add_action('init','gncom_register_posttype',0);
function gncom_register_posttype() {
/**************************
Portfolio
**************************/
$labels_portfolio = array(
'name' => 'Portfolio',
'singular_name' => 'Portfolio',
'add_new' => 'Ajouter un Portfolio',
'add_new_item' => 'Ajouter un Portfolio',
'edit_item' => 'Editer le Portfolio',
'new_item' => 'Nouveau Portfolio',
'view_item' => 'Voir le Portfolio',
'search_items' => 'Chercher dans les Portfolios',
'not_found' => 'Aucun Portfolio n\'a été trouvé',
'not_found_in_trash' => 'Aucun Portfolio n\'a été trouvé dans la corbeille'
);
$portfolio_args = array(
'labels' => $labels_portfolio,
'public' => true,
'show_in_nav_menus' => true,
'exclude_from_search' => false,
'has_archive' => true,
'query_var' => 'gnpost_portfolio',
'rewrite' => array(
'slug'=>'portfolio',
'with_front' => true,
),
'hierarchical'=> true,
'menu_position' => 6,
'menu_icon' => plugins_url( '/images/post_type_portfolio.png', __FILE__),
'supports' => array(
'title',
'editor',
'excerpt',
'thumbnail',
'revisions',
'page-attributes',
'genesis-simple-sidebars',
'genesis-layouts',
'genesis-seo'
)
);
<html>
<head>
<title></title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
.text-gras {font-weight: bold;}
</style>
<script type="text/javascript">
/*
// deux écritures
$(document).ready(function() {
$('li:first-child').addClass('text-gras');
});
*/
// function anonyme
$(function() {
$('li:first-child').addClass('text-gras');
});
</script>
</head>
<body>
<ul>
<li>Hello</li>
<li>Hello 2</li>
<li>Hello 3</li>
</ul>
</body>
</html>