Hace poco pense en usar esta funcion, a ver si me animo, me da un poco de pereza por el tener que editar plantillas que apenas conozco su funcionamiento.
New in WordPress 2.9: Post Thumbnail Images
First, in the theme’s functions.php , declare that your theme supports this feature. This will enable the UI in the WP Admin.
1 | add_theme_support( 'post-thumbnails' ); |
That will enable Post Thumbnail UI for both Post and Page content types. If you’d only like to add it to one, you can do it like this:
1 | add_theme_support( 'post-thumbnails' , array ( 'post' ) ); |
2 | add_theme_support( 'post-thumbnails' , array ( 'page' ) ); |
Simply remove the one you don’t want to support.
1 | set_post_thumbnail_size( 50, 50 ); |
1 | set_post_thumbnail_size( 50, 50, true ); |
2 | if ( has_post_thumbnail() ) { |
|
No hay comentarios:
Publicar un comentario