11. Creazione Area Widget e Sidebar e Stile CSS

Andiamo su functions.php nuova funzione: function init_widgets() {     register_sidebar(array(         ‘name’ => ‘Sidebar’,         ‘id’ => ‘sidebar’,         ‘before_widget’ => ‘<div class=”main-sidebar”>’,         ‘after_widget’ => ‘</div>’,         ‘before_title’ => ‘<h4>’,         ‘after_title’ => ‘</h4>’,     )); } add_action(‘widgets_init’, ‘init_widgets’); Creiamo una

Leggi tutto

10. Creazione pagina page.php

<?php get_header(); ?> <div class=”container”>     <?php if (have_posts()) : ?>         <?php while (have_posts()) : the_post(); ?>             <!–pagina–>             <article>                 <h3><?php the_title(); ?></h3>                 <!–se c’è immagine evidenza mostrala–>                 <?php if (has_post_thumbnail()) : ?>                     <div class=”img-post”> <?php the_post_thumbnail() ?></div>                 <?php endif; ?>                 <!–funzione che richiama contenuto –>                 <p><?php the_content(); ?></p>             </article>         <?php endwhile; ?>     <?php else : ?>         <?php echo wpautop(‘ops non ho trovato articoli’); ?>     <?php endif; ?> </div> <?php get_footer(); ?>

Leggi tutto