julsar
Eta
Verificación en dos pasos activada
Verificado por Whatsapp
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package sparkling
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; ?>
<?php sparkling_paging_nav(); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
<?php the_content(); ?>
<?php echo wp_trim_words( get_the_content(), 40, '...' ); ?>
<?php $recent = new WP_Query("showposts=1"); ?>
<?php if ($recent->have_posts()) : while($recent->have_posts()) : $recent->the_post();?>
<?php the_content(); ?>
<?php endwhile; ?>
<?php endif; ?>
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package sparkling
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php /* Start the Loop */ ?>
<?php $recent = new WP_Query("showposts=1"); ?>
<?php if ($recent->have_posts()) : while($recent->have_posts()) : $recent->the_post();?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; ?>
<?php sparkling_paging_nav(); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
optimus es lo primero que he hecho pero nada. 🙁
¿No estarás usando Chrome para ver los cambios no? Chrome tiene caché persistente, trata de no actualizar nada siempre que puede (para dar la impresión de que es un navegador rápido cuando es más lentooooooooooooooooo). Además si usas caché tienes que vaciarla.
Prueba con otro navegador, especialmente en modo privado/incógnito/porno o con el plugin zemante.
Si no funciona debe ser un problema del theme, deberías reportarlo al autor del mismo.
si, exacto. :encouragement:
- - - Actualizado - - -
si, pero he entrado con mozilla tb y nada. 🙁
Si estás usando Sparkling es un theme que carga los posts uno tras otro en "río continuo" no se pueden limitar los posts, pensé en usar ese theme pero no me agrada ese sistema.
Pero lo eh instalado y si me limita lo post en Ajustes > lectura
que raro, a mi si me funciona.!!
claro, es lo que quiero! me salen 10! 🙁
En principio prefiero reservarmelo 🙁
Utilizamos cookies y tecnologías similares para los siguientes fines:
¿Aceptas las cookies y estas tecnologías?
Utilizamos cookies y tecnologías similares para los siguientes fines:
¿Aceptas las cookies y estas tecnologías?