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


Converting html site to static wordpress site

我正在将一个单页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新手。感谢您的帮助。

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

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

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