Ciao a tutti,
vorrei mostrare nella Front Page di wordpress 6 tra gli ultimi post pubblicati, suddivisi in due colonne. Nel mio template ne mostrerebbe come numero standard 2 due. E qualunque modifica faccia ai file home.php e index.php non cambia niente, ne mostra sempre e comunque. C'è qualche altro file da modificare?
Ah, ovviamente ho già provato dal pannello di amministrazione con Settings>Reading, ma non funziona.
Info Utili:
Ho creato il template con Artisteer 4, la versione di Wordpress è la 3.6.
Pagina home.php
Codice PHP:
<?php get_header(); ?>
<?php get_sidebar('top'); ?>
<?php
if (have_posts()) {
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_' . (theme_is_home() ? 'home_' : '') . 'top_posts_navigation')) {
theme_page_navigation();
}
?>
<div class="content-layout">
<div class="content-layout-row">
<div class="layout-cell" style="width: 50%" >
<?php theme_get_next_post(); ?>
</div><div class="layout-cell" style="width: 50%" >
<?php theme_get_next_post(); ?>
</div>
</div>
</div>
<div class="content-layout">
<div class="content-layout-row">
<div class="layout-cell" style="width: 50%" >
<?php theme_get_next_post(); ?>
</div><div class="layout-cell" style="width: 50%" >
<?php theme_get_next_post(); ?>
</div>
</div>
</div>
<div class="content-layout">
<div class="content-layout-row">
<div class="layout-cell" style="width: 50%" >
<?php theme_get_next_post(); ?>
</div><div class="layout-cell" style="width: 50%" >
<?php theme_get_next_post(); ?>
</div>
</div>
</div>
<?php
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_bottom_posts_navigation')) {
theme_page_navigation();
}
} else {
theme_404_content();
}
?>
<?php get_sidebar('bottom'); ?>
<?php get_footer(); ?>
index.php
Codice PHP:
<?php get_header(); ?>
<?php get_sidebar('top'); ?>
<?php
if (have_posts()) {
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_' . (theme_is_home() ? 'home_' : '') . 'top_posts_navigation')) {
theme_page_navigation();
}
/* Start the Loop */
while (have_posts()) {
the_post();
get_template_part('content', get_post_format());
}
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_bottom_posts_navigation')) {
theme_page_navigation();
}
} else {
theme_404_content();
}
?>
<?php get_sidebar('bottom'); ?>
<?php get_footer(); ?>
Grazie mille!!