
Lo que tenemos a continuación es una forma atractiva de mostrar la fecha de publicación de una entrada y el número de comentarios de forma sencilla y por medio de CSS.
El resultado queda tal cual lo muestra la imagen de arriba (demo) y el CSS y el código Html para añadir en Wordpress es:
-
p.date {
-
width: 42px;
-
height: 10px;
-
padding: 18px 0 14px 0;
-
text-align: center;
-
}
-
p.date span { display: none; }
-
/************************************************
-
* iconos para cada mes *
-
************************************************/
-
.month1 { background: url(images/cal_01.gif) no-repeat 0 0; }
-
.month2 { background: url(images/cal_02.gif) no-repeat 0 0; }
-
.month3 { background: url(images/cal_03.gif) no-repeat 0 0; }
-
.month4 { background: url(images/cal_04.gif) no-repeat 0 0; }
-
.month5 { background: url(images/cal_05.gif) no-repeat 0 0; }
-
.month6 { background: url(images/cal_06.gif) no-repeat 0 0; }
-
.month7 { background: url(images/cal_07.gif) no-repeat 0 0; }
-
.month8 { background: url(images/cal_08.gif) no-repeat 0 0; }
-
.month9 { background: url(images/cal_09.gif) no-repeat 0 0; }
-
.month10 { background: url(images/cal_10.gif) no-repeat 0 0; }
-
.month11 { background: url(images/cal_11.gif) no-repeat 0 0; }
-
.month12 { background: url(images/cal_12.gif) no-repeat 0 0; }
-
/************************************************
-
* Burbuja con numero de comentarios*
-
************************************************/
-
.shield {
-
position: relative;
-
}
-
.commentscloud {
-
position: absolute;
-
text-align: center;
-
top: -4px;
-
left: 22px;
-
width: 30px;
-
height: 24px;
-
padding: 3px 0;
-
background: url(images/bubble.png) no-repeat 0 0;
-
}
En CSS-Tricks han explicado más profundamente el código aún que no hay demasiado que explicar, simplemente añadimos el código CSS en la hoja de estilo de nuestro Theme y el código Html en el archivo index.php y single.php si queremos que se muestre también en la vista de artículos.