Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
|
logiciels:wordpress:accueil [2015/07/11 13:55] resonance créée |
logiciels:wordpress:accueil [2015/07/28 10:29] (Version actuelle) resonance [Liens utiles] |
||
|---|---|---|---|
| Ligne 19: | Ligne 19: | ||
| Il s'agit essentiellement de trick en php pour ajouter des fonctions à votre wordpress en php. | Il s'agit essentiellement de trick en php pour ajouter des fonctions à votre wordpress en php. | ||
| - | * **Image à la une** crop http:// | + | * **Image à la une crop** http:// |
| * **Afficher liste d' | * **Afficher liste d' | ||
| + | * **Ajouter des fonctions** http:// | ||
| + | * http:// | ||
| + | * **mail smtp avec contact form 7**http:// | ||
| + | * [[https:// | ||
| + | |||
| + | |||
| + | **Afficher liste d' | ||
| + | <code php> | ||
| + | // post list categorie function | ||
| + | function jc_post_by_category($atts) { | ||
| + | extract(shortcode_atts(array( | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ), $atts)); | ||
| + | global $post; | ||
| + | $tmp_post = $post; | ||
| + | $myposts = get_posts(' | ||
| + | |||
| + | $out = '< | ||
| + | foreach($myposts as $post){ | ||
| + | setup_postdata( $post ); | ||
| + | |||
| + | $out .='< | ||
| + | $out .='< | ||
| + | $out .='< | ||
| + | $out .='< | ||
| + | } | ||
| + | $out .= '</ | ||
| + | wp_reset_postdata(); | ||
| + | $post = $tmp_post; | ||
| + | return $out; | ||
| + | } | ||
| + | add_shortcode(" | ||
| + | |||
| + | </ | ||
| + | |||
| + | **Limiter la longueur de l' | ||
| + | <code php> | ||
| + | function custom_excerpt_length( $length ) { | ||
| + | return 20; | ||
| + | } | ||
| + | add_filter( ' | ||
| + | </ | ||