【问题标题】:Converting html site to static wordpress site将 html 网站转换为静态 wordpress 网站
【发布时间】:2013-02-11 21:26:18
【问题描述】:

我正在将单页 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 新手。帮助表示赞赏。

【问题讨论】:

  • 是的,有可能,但你的问题实在是太模糊了。咨询Codex,也许还有一些教程WPTuts
  • 他们在wpsiteconvertor.com 上提供了一个非常简单且免费的程序,您可以使用它快速将您的网站转换为wordpress

标签: php html wordpress


【解决方案1】:

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

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-07
    • 2011-12-16
    • 1970-01-01
    • 2014-03-14
    • 2020-10-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多