Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/12/2013, 09:13
Avatar de moriorGames
moriorGames
 
Fecha de Ingreso: diciembre-2013
Ubicación: Barcelona
Mensajes: 37
Antigüedad: 12 años, 9 meses
Puntos: 3
Respuesta: Que le falta a este código, me da error

Al final pones un endif; que no pinta nada.

¿Qué tal así? No lo he probado pero debería funcionar ^^

Código PHP:
<?php
function admired_posted_on() {
    if ( 
in_category( '18' ) ) {

        
printf( __( '<span class="sep"></span><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></span>', 'admired' ),
        
esc_url( get_permalink() ),
        
esc_attr( get_the_time() ),
        
esc_attr( get_the_date( 'c' ) ),
        
esc_html( get_the_date() ),
        
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
        
sprintf( esc_attr__( 'View all posts by %s', 'admired' ), get_the_author() ),
        
esc_html( get_the_author() ) );

    } elseif ( 
in_category ('15', '20') ) {

        
printf( __( '<span class="by-author"> <span class="sep"> by </span> <span class="author vcard">%7$s</span></span>', 'admired' ),
        
esc_url( get_permalink() ),
        
esc_attr( get_the_time() ),
        
esc_attr( get_the_date( 'c' ) ),
        
esc_html( get_the_date() ),
        
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
        
sprintf( esc_attr__( 'View all posts by %s', 'admired' ), get_the_author() ),
        
esc_html( get_the_author() ) );
    }
}
__________________
Mi juego de estrategia medieval si lo entras hazme llegar tu opinión por favor, siempre la tengo en cuenta.