¿Cómo centrar títulos de posts en la página principal de WordPress?

  • Autor Autor Genisuf
  • Fecha de inicio Fecha de inicio
Genisuf

Genisuf

Gamma
Programador
Verificado por Whatsapp
Hola, quisiera centrar los titulos de los post en el home de mi página. Seguramente haya que poner algo en el index pero soy novato y no se me ocurre donde ponerlo, he probado algunas pero no me funciono ninguna.
Debe ser que hay que poner algo en esta porcion codigo?

<div class="art-Post-inner art-article">
<h2 class="art-PostHeaderIcon-wrapper">
<span class="art-PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
<?php the_title(); ?>
</a></span>
</h2>
<?php ob_start(); ?>
<?php $icons = array(); ?>
<?php if (!is_page()): ?><?php ob_start(); ?><?php the_time(__('F jS, Y', 'kubrick')) ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page()): ?><?php ob_start(); ?><?php _e('Author', 'kubrick'); ?>: <a href="#" title="<?php _e('Author', 'kubrick'); ?>"><?php the_author() ?></a>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (current_user_can('edit_post', $post->ID)): ?><?php ob_start(); ?><?php edit_post_link(__('Edit', 'kubrick'), ''); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
<div class="art-PostHeaderIcons art-metadata-icons">
<?php echo implode(' | ', $icons); ?>

creo que es la parte de los titles del index
creía que era centrando esto <?php the_title(); ?> asi
<center><?php the_title(); ?></center> pero no funciono 🙁
 
Abre tu archivo style.css y a esta línea:
Insertar CODE, HTML o PHP:
.art-PostHeaderIcon-wrapper, .art-PostHeaderIcon-wrapper a, .art-PostHeaderIcon-wrapper a:link, .art-PostHeaderIcon-wrapper a:visited, .art-PostHeaderIcon-wrapper a:hover
{
    font-family: Arial, Helvetica, Sans-Serif;
    font-size: 26px;
    font-style: normal;
    font-weight: normal;
    letter-spacing: -1px;
    text-align: left;
    color: #000000;
}

Agrega esta:
Insertar CODE, HTML o PHP:
text-align: center;

Para que quede asi:
Insertar CODE, HTML o PHP:
.art-PostHeaderIcon-wrapper, .art-PostHeaderIcon-wrapper a, .art-PostHeaderIcon-wrapper a:link, .art-PostHeaderIcon-wrapper a:visited, .art-PostHeaderIcon-wrapper a:hover
{
    font-family: Arial, Helvetica, Sans-Serif;
    font-size: 26px;
    font-style: normal;
    font-weight: normal;
    letter-spacing: -1px;
    text-align: left;
    color: #000000;
    text-align: center;
}
 
Me anduvo perfecto! Mil gracias por la ayuda!
 
Atrás
Arriba