将html站点转换为静态wordpress站点

时间:2013-02-05 13:39:05

标签: php html wordpress

我正在将单页html网站转换为静态wordpress网站。 原始的html主页(唯一的页面)主要使用jquery在单击菜单中的选项时下拉一个小文本区域。 附加我转换后的主题的index.php。

<div class="content" id="content1">
<a href="" onclick="deanimate('content1')"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/close.png" style="position:absolute; right:5px; top:5px; width:15px;"/></a>
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/face.png" style="padding-left:15px; padding-top:20px; width:454px;" />
</div>


<div class="content" id="content2">
<a href="" onclick="deanimate()"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/close.png" style="position:absolute; right:5px; top:5px; width:15px;"/></a>
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/face2.png" style="padding-right:15px; padding-top:30px; width:453px; height:200px;" />
</div>

等等.. 我想以这样的方式添加内容,以便我可以在wordpress应用程序中修改它而无需编辑主题文件?可能吗 ? wordpress新手。感谢帮助。

1 个答案:

答案 0 :(得分:0)

是的,您可以编辑wp-admin中的内容。在admin下的页面管理中,您可以创建页面,然后在page.php或模板文件中添加循环,它将显示您在admin中编写的内容。

<?php while ( have_posts() ) : the_post(); ?>
<?php the_title();?>
<?php the_content();?>
<?php endwhile;?>

使用上面的代码,您可以在浏览器上显示页面管理内容。