Ver Mensaje Individual
  #9 (permalink)  
Antiguo 16/10/2013, 08:10
Avatar de Nekko
Nekko
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Buenos Aires
Mensajes: 3.141
Antigüedad: 16 años, 1 mes
Puntos: 656
Respuesta: Eliminar enlaces y agregar enlaces externos en los títulos de los post

Te dejo algo que se me ocurre sobre la marcha (no está testeado), dentro del bucle:

Código PHP:
Ver original
  1. <?php $link = get_post_meta($post->ID, 'link', true);
  2. if ($link == "no") {?>
  3. <h2 class="entry-title"><?php the_title(); ?></h2>
  4. <?php exit; } if ($link) { ?>
  5. <h2 class="entry-title"><a href="<?php echo $link; ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  6. <?php exit; } else { ?>
  7. <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  8. <?php } ?>
__________________
Taller para crear themes wordpress desde cero | Presupuestos para trabajos particulares vía MP