Accettate domande elementari da noviziati, in questo club?
Ho provato a spezzare alcune righe di PHP, ed ho ottenuto quello che desideravo (riguardo incolonnamenti e spezzature di testo).
Per esempio ho cambiato
Codice PHP:
<h1> echo esc_html$name );
if ( 
'' != $slogan ) { echo ' - ' $slogan; }</h1
in
Codice PHP:
<h1> echo esc_html$name ); </h1>
<
h2> if ( '' != $slogan ) { echo ' - ' $slogan; }</h2
Oppure ho cambiato questo
Codice PHP:
if ( '' !== trimget_search_query() ) ) :
if ( 
have_posts() ) :
while ( 
have_posts() ) :
the_post();
if( 
'product' == get_post_type() )
get_template_part'content''product' );
else
get_template_part'content''search' );
endwhile; 
in questo
Codice PHP:
if ( '' !== trimget_search_query() ) ) :
if ( 
have_posts() ) :
while ( 
have_posts() ) :
the_post();
<
div class="col-md-4">
if( 
'product' == get_post_type() )
get_template_part'content''product' );
else
get_template_part'content''search' );
</
div
Ma mi chiedo se è la procedura corretta oppure interrompo qualche flusso php? Oppure bisogna lavorare nei templates?