• Hi

    I am far away from being a developper, so I was wondering if this code is a good way to include html into my front-page.php or if I should use “echo”, or something else better.

    My worry is to have something light and as fast as possible, that’s the reason why I avoid as much as I can to insert widget area with widget inside. But maybe it is a bad thing !

    Thank you to anybody who have something to say about this !

    Marion

    // Remove the default Genesis loop ans add custom homepage instead
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'one_pager_homepage_content' );
    function one_pager_homepage_content() { ?>
    
        <!-- Welcome section -->
            <section id="welcome" class="parallax">
                <h2>Bienvenu sur le site d'Alizée Roussel, cavalière de dressage</h2>
            </section>
    
       <!-- Prestation section -->
    	<section id="prestation" class="parallax">
    		<article class="wrap">
                           <h3>MES PRESTATIONS</h3>
                           <div class="prestation dressage one-third first">
                                 <div class="photo"><img alt="dressage du cheval" src="http://localhost/wordpress/wp-content/themes/one-pager-genesis-master/images/prestations/dressage.jpg"/></div> ..... .......

The topic ‘best practice about php code’ is closed to new replies.