Message d'erreur

  • Deprecated function : The each() function is deprecated. This message will be suppressed on further calls dans _menu_load_objects() (ligne 569 dans /home/chezmiss/www/artnetwalk/includes/menu.inc).
  • Deprecated function : Methods with the same name as their class will not be constructors in a future version of PHP; views_display has a deprecated constructor dans require_once() (ligne 3097 dans /home/chezmiss/www/artnetwalk/includes/bootstrap.inc).
  • Deprecated function : Methods with the same name as their class will not be constructors in a future version of PHP; views_many_to_one_helper has a deprecated constructor dans require_once() (ligne 113 dans /home/chezmiss/www/artnetwalk/sites/all/modules/ctools/ctools.module).

WordPress : Modifier "RECENT_POST".

Comment modifier le "recent_post" par catégorie :

Chemin :
wp-includes/default-widgets.php

Changer la ligne :
$r = new WP_Query( apply_filters( 'widget_posts_args', array(
'posts_per_page' => $number,
'no_found_rows' => true,
'post_status' => 'publish',
'ignore_sticky_posts' => true
) ) );
if ($r->have_posts()) :

PAR

$r = new WP_Query( apply_filters( 'widget_posts_args', array(
'posts_per_page' => $number,
'category__not_in' => array( 1,3,4 ),
'no_found_rows' => true,
'post_status' => 'publish',
'ignore_sticky_posts' => true
) ) );

Pour exclure les catégories 1, 3 et 4 et afficher uniquement 2:
'category__not_in' => array( 1,3,4 ),