Wordpress 页面主题/布局 [英] Wordpress pages theme/layout

查看:31
本文介绍了Wordpress 页面主题/布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我是否可以为每个页面设置不同的布局和内容?例如我有4个页面,我有4个完全不同的布局设计,我需要制作4个主题然后应用到不同的页面还是别的什么?

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?

此外,我可以在不同的页面上显示不同的帖子吗?比如帖子 1/或标签 [google] 转到第 1 页,帖子编号 5/tag[orange] 转到第 3 页?

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

推荐答案

针对不同的页面制作不同的模板,让每一页呈现不同的设计

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

为了使模板创建普通的php文件,并在文件顶部通过替换模板名称为每个模板添加代码

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)

这篇关于Wordpress 页面主题/布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆