Love丶FFC's Blog
2019-10-28 10:06:29
阅读:936 • 评论:14
标签:WordPress
这篇文章主要讲解编写一个文章页之前要做的准备工作。
在上一篇文章我们已经发布了一篇文章,因此我们只需再编写一个single.php文件即可,WordPress默认将single.php设置为文章的内容页,如果开发者不编写single.php的话,点击文章的链接就无法查看具体内容。
1.首先在EditPlus中新建一个single.php文件。
2.开始正式编写single.php中的代码,代码如下:
<?php get_header(); ?> <div class="Public-Position"> <div>位置:<a href="http://10.100.124.68/initial/">首页</a>-><a href="#"><?php echo the_title(); ?></a></div> </div> <div class="Public-Article"> <h1 class="Public-Article-Title"><?php echo $post->post_title;?></h1> <div class="Public-Article-Information"> <b><?php echo $post->post_date;?></b> </div> <div class="Public-Article-Content"><?php echo $post->post_content;?> </div> </div> <?php get_footer(); ?>
看一下浏览效果。
此时还没有编写针对single.php的CSS文件,同时也没有编写header.php和footer.php,因此目前要先编写两个公共模板。
3.新建header.php文件,将index.php中26行以前的代码都剪切粘贴到header.php中。同时在index.php中添加<?php get_header(); ?>。
4.新建footer.php文件,将index.php中28行以后的代码都剪切粘贴到footer.php中。 同时在index.php的底部添加<?php get_footer()? > 。
此时刷新一下页面,会看到显示效果改变,因为single.php将公共头部和公共底部都引入了。
下一篇文章开始讲解文章页的相关调用数据的代码,同时编写一段CSS。
fruinly
38 In a driving study by Betts and colleagues 55 subjects taking 5 mg of prochlorperazine 3 times daily showed increased carelessness and significant slowing on a maneuvering task cialis from usa pharmacy 1 cre ERT2 Luo J and Lox tdTomato B6
jordans for cheap
I just wanted to thank you for the fast service. and they look great. I received them a day earlier than expected. like the I will definitely continue to buy from this site. either way I will recommend this site to my friends. Thanks!
jordans for cheap https://www.cheaprealjordan.com/
cheap real jordans
I just wanted to thank you for the fast service. or possibly a they look great. I received them a day earlier than expected. significantly I will definitely continue to buy from this site. manner in which I will recommend this site to my friends. Thanks!
cheap real jordans https://www.realcheapretrojordanshoes.com/
original louis vuittons outlet
I just wanted to thank you for the fast service. or just they look great. I received them a day earlier than expected. the same as I will definitely continue to buy from this site. an invaluable I will recommend this site to my friends. Thanks!
original louis vuittons outlet https://www.cheapreallouisvuitton.com/
cheap louis vuitton outlet
I just wanted to thank you for the fast service. and they look great. I received them a day earlier than expected. such I will definitely continue to buy from this site. in any event I will recommend this site to my friends. Thanks!
cheap louis vuitton outlet https://www.bestlouisvuittonoutlet.com/
cheap jordans for sale
I just wanted to thank you for the fast service. aka they look great. I received them a day earlier than expected. similar to I will definitely continue to buy from this site. regardless I will recommend this site to my friends. Thanks!
cheap jordans for sale https://www.realjordansretro.com/
engarma
priligy dapoxetine amazon Johnathon josPhyeaWcgDtM 5 29 2022
louis vuitton outlet
Read reviews and was a little hesitant since I had already inputted my order. or maybe a but thank god, I had no issues. just like the received item in a timely matter, they are in new condition. direction so happy I made the purchase. Will be definitely be purchasing again.
louis vuitton outlet https://www.louisvuittonsoutletstore.com/
authentic cheap jordans
Read reviews and was a little hesitant since I had already inputted my order. or else but thank god, I had no issues. particularly the received item in a timely matter, they are in new condition. direction so happy I made the purchase. Will be definitely be purchasing again.
authentic cheap jordans https://www.retrocheapjordansshoes.com/
cheap real jordans
Read reviews and was a little hesitant since I had already inputted my order. or possibly but thank god, I had no issues. which includes received item in a timely matter, they are in new condition. an invaluable so happy I made the purchase. Will be definitely be purchasing again.
cheap real jordans https://www.realjordansshoes.com/
cheap louis vuitton
Read reviews and was a little hesitant since I had already inputted my order. or even a but thank god, I had no issues. just like received item in a timely matter, they are in new condition. you decide so happy I made the purchase. Will be definitely be purchasing again.
cheap louis vuitton https://www.louisvuittonsoutletonline.com/
Preliaf
Demarcus, USA 2022 06 26 09 30 58 priligy generico
Preliaf
Today I had TONS of ewcm on day 7 of my cycle, and it is not my ovulation time dog viagra
qHDHOJZO
can i buy cialis online albuterol and cisapride both increase QTc interval