Supporto » Aspetto = Temi » eliminare immagine evidenza nell’articolo tema AccessPress Parallax

  • annmel26

    (@annmel26)


    Ciao a tutti,
    volevo chiedervi aiuto su questo mio problema, ovvero..come eliminare l’Immagine in evidenza all’interno dell’articolo?
    Ho cercato sul web ma non ho trovato risposta. Da quanto ho capito, forse, devo modificare il seguente codice?
    AccessPress Parallax: Articolo singolo (single.php):

    <?php
    /**
    * The template for displaying all single posts.
    *
    * @package accesspress_parallax
    */

    get_header(); ?>
    <div class=”mid-content clearfix”>
    <div id=”primary” class=”content-area”>
    <main id=”main” class=”site-main” role=”main”>

    <?php while ( have_posts() ) : the_post(); ?>

    <?php get_template_part( ‘content’, ‘single’ ); ?>

    <?php
    $post_pagination = of_get_option(‘post_pagination’);
    if( $post_pagination == 1 || !isset($post_pagination)) :
    the_post_navigation( array(
    ‘prev_text’ => ‘<i class=”fa fa-hand-o-left”></i>’ . __( ‘%title’, ‘accesspress-parallax’ ),
    ‘next_text’ => __( ‘%title’, ‘accesspress-parallax’ ) . ‘<i class=”fa fa-hand-o-right”></i>’,
    ‘in_same_term’ => true,
    ));
    endif;
    ?>

    <?php
    // If comments are open or we have at least one comment, load up the comment template
    if ( comments_open() || ‘0’ != get_comments_number() ) :
    comments_template();
    endif;
    ?>

    <?php endwhile; // end of the loop. ?>

    </main><!– #main –>
    </div><!– #primary –>

    <?php get_sidebar(); ?>
    </div>
    <?php get_footer();

    GRAZIE

    • Questo topic è stato modificato 7 anni fa da annmel26. Motivo: IMMAGINE EVIDENZA
Stai visualizzando 1 risposte (di 1 totali)
  • Moderatore Cristiano Zanca

    (@cristianozanca)

    Ciao @annmel26 ,

    come scritto qui https://it.wordpress.org/forums/topic/prima-di-aprire-un-ticket-leggi-qui/

    1. MODIFICARE TEMA O PLUGIN (CHILD THEME)
    I temi non si modificano direttamente, è preferibile fare un CHILD THEME https://codex.wordpress.org/it:Temi_Child. Se modificate un tema esistente e lo aggiornate, tutte le vostre modifiche andranno perdute. Con un tema Child, potrete aggiornare il tema genitore e continuare a mantenere le vostre modifiche.

    nel file functions.php usare questo

    <?php
    
    // Queue up the parent theme's stylesheet
    add_action( 'wp_enqueue_scripts', 'mh_child_style' , 5 );
    function mh_child_style() {
            wp_enqueue_style( 'accesspress_parallax_parent_style', get_template_directory_uri() . '/style.css' );
    }
    
    // Replace the featured image in posts only with a HTML comment
    add_filter( 'post_thumbnail_html', 'mh_post_image_html', 10, 3 );
    function mh_post_image_html( $html, $post_id, $post_image_id ) {
            if( is_single() ) {
                    $html = '<!-- The featured image would be here if I chose to display it. ;) -->';
            }
            return $html;
    }

    Dicci se ha funzionato

Stai visualizzando 1 risposte (di 1 totali)
  • Il topic ‘eliminare immagine evidenza nell’articolo tema AccessPress Parallax’ è chiuso a nuove risposte.