I have created an example.php:
<?php get_header();
get_template_part('template-parts/banner','title'); ?>
<div class="container">
<p>HERE GOES THE TEXT</p>
</div>
<?php get_footer(); ?>
in the page-main.php I have created a link:
<a href="<?php echo site_url('/example.php'); ?></a>
When I click it I can see in (page.php/example-php) the header, the footer but NOT the html part. What am I doing wrong?
Please help and thank You for Your help.
After searching the net and reading, I figured that inserting this code:
<?php while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile;
?>
made my day. Now I can display my page as a new separate page. So now all the code looks like this:
<?php get_header();
get_template_part('template-parts/banner','title'); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile;
?>
<div class="container">
<p>HERE GOES THE TEXT</p>
</div>
<?php get_footer(); ?>
But if You think that its wrong what I have done please let me know. I am learning so please forgive me for my lack of knowledge.