Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/12/2010, 14:53
Avatar de masterpuppet
masterpuppet
Software Craftsman
 
Fecha de Ingreso: enero-2008
Ubicación: Montevideo, Uruguay
Mensajes: 3.550
Antigüedad: 16 años, 3 meses
Puntos: 845
Respuesta: Dar formato a texto devuelto en una función PHP

Porque no te creas una funcion(supongo que iria en un plugin o algo asi) custom_the_title para parsear el titulo? algo asi:

Código PHP:
Ver original
  1. function custom_the_title($separator = '-', $before = '', $after = '', $echo = true)
  2. {
  3.     $title = explode($separator, the_title($before, $after, $echo)); //asumiendo que separas por "-"
  4.     return  '<span class="author">'  . $title[0] . '</span>' .
  5.             '<span class="song">' . $title[1] . '</span>';
  6. }

Salu2.