Good day. I had a problem, just recently started working with WordPress and encountered the following problem: There is a page for displaying categories of materials. How to make it so that it was possible to derive some other elements besides the articles themselves. For example, the menu is on the right or on the left, some text can be written from below or above, etc. Now I can only select the category of articles in the menu and that's it. It is displayed in the base view.

  • 2
    As an option to use widgets. Register a new widget in functions.php , then call it in the template and display anything there! - Ihor Tkachuk

1 answer 1

You make another request with the necessary parameters and display:

 $new_query = new WP_Query( 'category_name=other_materials' ); if ( $new_query->have_posts() ) { while ( $new_query->have_posts() ) { $new_query->the_post(); echo '<p>' . get_the_title() . '</p>'; } } wp_reset_postdata(); // Restore original Post Data