首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >正在将html站点转换为静态wordpress站点

正在将html站点转换为静态wordpress站点
EN

Stack Overflow用户
提问于 2013-02-05 21:39:05
回答 1查看 277关注 0票数 0

我正在把一个单页面的html站点转换成一个静态的wordpress站点。最初的html主页(唯一的页面)主要是使用jquery在点击远菜单中的一个选项时下拉一个小的文本区。附上我转换的主题的index.php。

代码语言:javascript
运行
复制
<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新手。感谢您的帮助。

EN

回答 1

Stack Overflow用户

发布于 2013-02-11 21:26:18

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

代码语言:javascript
运行
复制
<?php while ( have_posts() ) : the_post(); ?>
<?php the_title();?>
<?php the_content();?>
<?php endwhile;?>

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14708860

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档