The goal is to display entries on a specific page. I somehow tried to just paste this code.

<?php if( have_posts() ){ while( have_posts() ){ the_post(); ?> <div <?php post_class(); ?> id="post-<?php the_ID(); ?>"> <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> <?php the_content(); ?> </div> <?php } /* конец while */ } ?> 

and thought records would be displayed. But there it was, there was no output of records. Someone suggested to me that it is possible to display entries using headings on a particular page, but here is the question - how to display the headings on the page? There are a lot of useless lessons on the Internet, from viewing which is one irritation, since none of them teach what it refers to in the title ... I will be very grateful for the help !!!

    1 answer 1

    In WordPress, create a blank page with the desired constant link (slug), for example, filter:

    enter image description here

    In the theme folder /wp-content/themes/моя_тема create the file page-filter.php . Insert your code into it. On the website at http://сайт/filter/ see the result.

    PS To understand why this works, read about the hierarchy of WordPress templates .

    • Well, you just told me how to connect the page, I had no problems with that. So I put a record output cycle on this new page and they didn’t come out dropmefiles.com/4lGBD - LiEm
    • To understand what you have problems with and what you don’t, you need to correctly formulate a question. I would not spend my time on this part of the answer. - KAGG Design
    • Why such a strange conclusion on the page? What is the page code in the browser? You have a problem clearly not in the code - KAGG Design