Wordpress pages theme/layout

2019-08-06 04:19发布

I'd like to know whether I could have different layout and content for each page? For example, I have 4 pages, and I have 4 completely different layout design, do I need to make 4 themes then apply to different pages or something else?

Moreover, can I have different posts show on different page? like post no.1/or tag [google] goes to page 1, post no.5/tag[orange] goes to page 3?

I'd like to learn how to structure this idea. Many thanks

enter image description here

1条回答
smile是对你的礼貌
2楼-- · 2019-08-06 04:25

make the diffrent template for different pages to show the different design on every page

for making template create normal php file and at the top of file add the code for every template by replacing template name

<?php
/*
Template Name:About Us

 */


  ?>

By this you get different template for about us put you code desing that you want to show for this page and from that back end select the template from rignt hand side option and save that page .

And to show different post on different pages you need to create category after that where you want to call the post for page call the category code for that

<?php Query_post('cat=3&showposts');
      while(have_posts()): the_post();
           the_title();
       endwhile; wp_reset_query(); ?> every time  on different page you just chage the category id   (cat)
查看更多
登录 后发表回答