I’ve tried many alternative codes:
<a href="<?php echo get_template_part( 'template/test/post' ); ?>"> Take a look at 1</a>
<a href="<?php echo get_template_directory_uri(); ?>/template/posts.php"> Take a look at 2 </a>
<a href="<?php bloginfo('template_url'); ?>/template/posts.php"> Take a look at 3</a>
<a href="<?php echo get_page_link( '/template/posts.php' ); ?>">Take a look at 4</a>
I get URLs like this
I’m utilizing the code (Take a look at 1) :
<a href="<?php echo get_template_part( 'template/test/post' ); ?>"
and Coming to this web page after clicking:
I wish to create a separate template web page for all of the posts.
However once I add header customized web page exhibiting errors.
how do I embody the header (<?php get_header(); ?>
) footer and posts loop?
That is my code on posts.php
<?php get_header(); ?>
<?php
$blog_args = (get_query_var('paged')) ? get_query_var('paged') : 1;
$blog_args = array (
'post_type' => 'submit',
'paged' => $blog_args
);
$blog_posts = new WP_Query($blog_args);
whereas($blog_posts->have_posts()) {
$blog_posts->the_post();
?>
<a href="<?php the_permalink( ) ?>"> <?php echo wp_trim_words( get_the_title(), 5 ); ?></a>
<?php echo substr( get_the_excerpt(), 0, 94,)."..."; ?>
<?php } ?>
<?php wp_reset_postdata() ?>
Notice: "/**
- Template Identify: Posts Web page Template
*/ " : I do not need that kind of choosing choice.