J
J
Johnny Show2016-01-21 18:52:57
WordPress
Johnny Show, 2016-01-21 18:52:57

How to make a template for a Wordpress page (custom)?

1) Make a template for the page (custom)
2) Display Header, Footer, Sidebar, page content
3) In the admin panel in WYSYWING, when editing the page, make
it possible to display all posts of the category with a shortcode, the shortcode should
look like [category = "category slug"]
The output of posts should look like this on the Front-end:
a) Post thumbnail (if any)
b) Brief description of the post
c) Date
d) Read more button
e) Optional Post Format
4) Optionally add pagination to posts (If more than 6 entries
Please at least a hint, because I have never made a WordPress template, but only worked with a ready-made template.Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max, 2016-01-24
@SuperMax899

Out of habit, after reading the TK, I began to look for a price.
The template is made as a .php file inside it, first you put
it. This will be the name, after which it is available in the choice of templates for the page.
get_footer(); etc. to take the standard parts of the template; how to output individual files: <?php include('templatelanding-header.php'); ?>
post output, such a loop

<?php while ( have_posts() ) : the_post(); ?>
        <?php the_content(); ?>
      <?php endwhile; // end of the loop. ?>

shortcode should work.
the rest is here: https://codex.wordpress.org/%D0%98%D0%B5%D1%80%D0%...
if you have a question about the code, drop it in the comment, I will answer :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question