mailsonmarques89
Forum Replies Created
-
Forum: Plugins
In reply to: [Interactive Content – H5P] Send email at final the lessonOh, thanks, one more question. Is any event generated at the end of class that I can capture?
Forum: Developing with WordPress
In reply to: get_template_part – CustomPeople, thank you for the help. @joy using your logic I made it work as I needed it. Instead of passing set_query_var I just passed the get_template_var and it worked as I needed it.
The loop made the process of each pass pick up a different model, where the path was in the array.<?php if( $the_query->have_posts() ){ ?> <?php $i = 0; while ( $the_query->have_posts() ) : $the_query->the_post(); get_template_part( 'template-parts/content', $cards[$i]['model_card'] ); $i++; ?> <?php endwhile; } else { ?> <div class="col-12"> nothin result </div> <?php }?>@bcworkz Thanks for the explanation, I’ll probably use this function in the future.
Forum: Developing with WordPress
In reply to: get_template_part – CustomFirst of all thanks for the help. yes, @joy I have files with these names. My site is a news portal, where each card is news. On the home page, each card will assume a number of columns. for example:
news 1: - 8 columns news 2: - 2 columns news 3: - 2 columnsThis columns is reference of bootstrap.
This is the client that selects. So I wanted the latest news to have a different card template. @bcworkz, I did not understand the use of pre_get_posts. Could you explain me, please?